Class: StompServer::StompAuth

### Home Classes Methods

### In Files

- lib/stomp_server/stomp_auth.rb

### Parent

Object

### Methods

- ::new

### 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::StompAuth

### Attributes

authorized[RW]

### Public Class Methods

new(passfile='.passwd') click to toggle source

    # File lib/stomp_server/stomp_auth.rb, line 6
    def initialize(passfile='.passwd')
      @passfile = passfile
      @authorized = Hash.new
      if File.exists?(@passfile)
        file = File.read(@passfile)
        file.split(/\n/).each do |data|
          next if data =~/^\s*#/
          data.gsub(/\s/,'')
          if data =~ /^\s*(\S+)\s*:\s*(.*?)\s*$/
            @authorized[$1] = $2
          end
        end
      end
      puts "Authorized users #{@authorized.keys}" if $DEBUG
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.