Class: MessagePack::IDL::IR::EnumValue
- Defined in:
- lib/msgpack/idl/ir.rb
Instance Attribute Summary collapse
-
#enum ⇒ Object
readonly
Returns the value of attribute enum.
-
#field ⇒ Object
readonly
Returns the value of attribute field.
Instance Method Summary collapse
- #==(o) ⇒ Object
-
#initialize(enum, field) ⇒ EnumValue
constructor
A new instance of EnumValue.
Constructor Details
#initialize(enum, field) ⇒ EnumValue
Returns a new instance of EnumValue.
240 241 242 243 |
# File 'lib/msgpack/idl/ir.rb', line 240 def initialize(enum, field) @enum = enum @field = field end |
Instance Attribute Details
#enum ⇒ Object (readonly)
Returns the value of attribute enum.
244 245 246 |
# File 'lib/msgpack/idl/ir.rb', line 244 def enum @enum end |
#field ⇒ Object (readonly)
Returns the value of attribute field.
244 245 246 |
# File 'lib/msgpack/idl/ir.rb', line 244 def field @field end |
Instance Method Details
#==(o) ⇒ Object
246 247 248 249 |
# File 'lib/msgpack/idl/ir.rb', line 246 def ==(o) # TODO o.class == EnumValue && @enum.name == o.enum.name && @field.id == o.field.id end |