Class: AMQP::Protocol::Class

Inherits:
Object
  • Object
show all
Defined in:
lib/amqp/spec.rb

Direct Known Subclasses

Access, Basic, Channel, Connection, Dtx, Exchange, File, Queue, Stream, Test, Tunnel, Tx

Defined Under Namespace

Classes: Method

Class Method Summary collapse

Class Method Details

.idObject



82
# File 'lib/amqp/spec.rb', line 82

def id()   self::ID end

.Method(id, name) ⇒ Object



113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/amqp/spec.rb', line 113

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.section.methods[#{id}] = klass
        klass.section.methods[klass::NAME] = klass
      end
    ]
  end
end

.methodsObject



111
# File 'lib/amqp/spec.rb', line 111

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

.nameObject



83
# File 'lib/amqp/spec.rb', line 83

def name() self::NAME end

.propertiesObject



80
# File 'lib/amqp/spec.rb', line 80

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