Class: Carrot::AMQP::Protocol::Class
- Inherits:
-
Object
- Object
- Carrot::AMQP::Protocol::Class
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
.id ⇒ Object
70
|
# File 'lib/amqp/spec.rb', line 70
def id() self::ID end
|
.Method(id, name) ⇒ Object
101
102
103
104
105
106
107
108
109
110
111
112
113
|
# File 'lib/amqp/spec.rb', line 101
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
|
.methods ⇒ Object
99
|
# File 'lib/amqp/spec.rb', line 99
def self.methods() @methods ||= {} end
|
.name ⇒ Object
71
|
# File 'lib/amqp/spec.rb', line 71
def name() self::NAME end
|
.properties ⇒ Object
68
|
# File 'lib/amqp/spec.rb', line 68
def properties() @properties ||= [] end
|