Class: MessagePack::IDL::AST::EnumField
- Defined in:
- lib/msgpack/idl/ast.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(id, name) ⇒ EnumField
constructor
A new instance of EnumField.
- #text ⇒ Object
Methods inherited from Element
Constructor Details
#initialize(id, name) ⇒ EnumField
Returns a new instance of EnumField.
142 143 144 145 |
# File 'lib/msgpack/idl/ast.rb', line 142 def initialize(id, name) @id = id @name = name end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
146 147 148 |
# File 'lib/msgpack/idl/ast.rb', line 146 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
146 147 148 |
# File 'lib/msgpack/idl/ast.rb', line 146 def name @name end |
Instance Method Details
#text ⇒ Object
148 149 150 |
# File 'lib/msgpack/idl/ast.rb', line 148 def text "#{@id}: #{@name}" end |