Class: Carrot::AMQP::Protocol::Class::Method

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.argumentsObject



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

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

.idObject



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

def id()     self::ID end

.nameObject



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

def name()   self::NAME end

.parentObject



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

def parent() Protocol.const_get(self.to_s[/Protocol::(.+?)::/,1]) end

Instance Method Details

#==(b) ⇒ Object



92
93
94
95
96
# File 'lib/amqp/spec.rb', line 92

def == b
  self.class.arguments.inject(true) do |eql, (type, name)|
    eql and __send__("#{name}") == b.__send__("#{name}")
  end
end