Class: Qrack::Protocol09::Class

Inherits:
Object
  • Object
show all
Defined in:
lib/ext/bunny-0.6.0/lib/qrack/protocol/spec09.rb

Direct Known Subclasses

Basic, Channel, Connection, Exchange, Queue, Tx

Defined Under Namespace

Classes: Method

Class Method Summary collapse

Class Method Details

.idObject



62
# File 'lib/ext/bunny-0.6.0/lib/qrack/protocol/spec09.rb', line 62

def id()   self::ID end

.Method(id, name) ⇒ Object



93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/ext/bunny-0.6.0/lib/qrack/protocol/spec09.rb', line 93

def self.Method(id, name)
  @_base_methods ||= {}
  @_base_methods[id] ||= ::Class.new(Method) do
    class_eval %[
      def self.inherited klass
        klass.const_set(:ID, #{id})
        klass.const_set(:NAME, :#{name.to_s})
        klass.parent.methods[#{id}] = klass
        klass.parent.methods[klass::NAME] = klass
      end
    ]
  end
end

.methodsObject



91
# File 'lib/ext/bunny-0.6.0/lib/qrack/protocol/spec09.rb', line 91

def self.methods() @methods ||= {} end

.nameObject



63
# File 'lib/ext/bunny-0.6.0/lib/qrack/protocol/spec09.rb', line 63

def name() self::NAME end

.propertiesObject



60
# File 'lib/ext/bunny-0.6.0/lib/qrack/protocol/spec09.rb', line 60

def properties() @properties ||= [] end