lib/right_amqp/amqp/spec.rb in right_amqp-0.7.0 vs lib/right_amqp/amqp/spec.rb in right_amqp-0.8.3

- old
+ new

@@ -1,11 +1,11 @@ #:stopdoc: -# this file was autogenerated on Mon Jan 23 15:55:36 -0800 2012 -# using amqp-0.8.json (mtime: Mon Jan 23 15:30:40 -0800 2012) +# this file was autogenerated on 2014-02-19 18:35:45 -0500 +# using amqp-0.8.json (mtime: 2013-11-07 17:14:52 -0500) # -# DO NOT EDIT! (edit protocol/codegen.rb instead, and run `rake codegen`) +# DO NOT EDIT! (edit protocol/codegen.rb instead, and run `rake spec:codegen`) module AMQP HEADER = "AMQP".freeze VERSION_MAJOR = 8 VERSION_MINOR = 0 @@ -77,12 +77,12 @@ ] end def properties() @properties ||= [] end - def id() self::ID end - def name() self::NAME end + def id() defined?(self::ID) ? self::ID : nil end + def name() defined?(self::NAME) ? self::NAME : super end end class Method class << self FIELDS.each do |f| @@ -95,11 +95,11 @@ end def arguments() @arguments ||= [] end def section() Protocol.const_get(self.to_s[/Protocol::(.+?)::/,1]) end - def id() self::ID end - def name() self::NAME end + def id() defined?(self::ID) ? self::ID : nil end + def name() defined?(self::NAME) ? self::NAME : super end end def == b self.class.arguments.inject(true) do |eql, (type, name)| eql and __send__("#{name}") == b.__send__("#{name}")