Class: MessagePack::IDL::AST::EnumLiteral
- Defined in:
- lib/msgpack/idl/ast.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, field) ⇒ EnumLiteral
constructor
A new instance of EnumLiteral.
- #text ⇒ Object
Constructor Details
#initialize(name, field) ⇒ EnumLiteral
Returns a new instance of EnumLiteral.
314 315 316 317 |
# File 'lib/msgpack/idl/ast.rb', line 314 def initialize(name, field) @name = name @field = field end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
318 319 320 |
# File 'lib/msgpack/idl/ast.rb', line 318 def field @field end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
318 319 320 |
# File 'lib/msgpack/idl/ast.rb', line 318 def name @name end |
Instance Method Details
#text ⇒ Object
320 321 322 |
# File 'lib/msgpack/idl/ast.rb', line 320 def text "#{@name}.#{@field}" end |