Class: StompServer::StompFrame

### Home Classes Methods

### In Files

- lib/stomp_server/stomp_frame.rb

### Parent

Object

### Methods

- ::new
- #dest
- #to_s

### Files

- History.txt
- Manifest.txt
- README.txt
- README.txt

### Class/Module Index

Quicksearch

- StompServer
- StompServer::ActiveRecordQueue
- StompServer::Configurator
- StompServer::DBMQueue
- StompServer::FileQueue
- StompServer::MemoryQueue
- StompServer::Protocols
- StompServer::Protocols::Http
- StompServer::Protocols::Stomp
- StompServer::Queue
- StompServer::QueueManager
- StompServer::QueueMonitor
- StompServer::Run
- StompServer::StompAuth
- StompServer::StompFrame
- StompServer::StompFrameRecognizer
- StompServer::StompId
- StompServer::StompUser
- StompServer::TestServer
- StompServer::TopicManager
- Mongrel
- Mongrel::HttpRequest
- ArMessage

No matching classes.

# StompServer::StompFrame

### Attributes

body[RW]
command[RW]
headers[RW]

### Public Class Methods

new(command=nil, headers=nil, body=nil) click to toggle source

    # File lib/stomp_server/stomp_frame.rb, line 5
    def initialize(command=nil, headers=nil, body=nil)
      @command = command
      @headers = headers || {}
      @body = body || ''
    end

### Public Instance Methods

dest() click to toggle source

    # File lib/stomp_server/stomp_frame.rb, line 22
    def dest
      #@dest || (@dest = @headers['destination'])
      @headers['destination']
    end

to_s() click to toggle source

    # File lib/stomp_server/stomp_frame.rb, line 11
    def to_s
      result = @command + "\n"
      @headers['content-length'] = @body.size.to_s if @body.include?(0.chr)
      @headers.each_pair do |key, value|
        result << "#{key}:#{value}\n"
      end
      result << "\n"
      result << @body.to_s
      result << "\0000\n"
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.