Class: MessagePack::IDL::AST::EnumLiteral

Inherits:
Literal
  • Object
show all
Defined in:
lib/msgpack/idl/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#fieldObject (readonly)

Returns the value of attribute field.



318
319
320
# File 'lib/msgpack/idl/ast.rb', line 318

def field
  @field
end

#nameObject (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

#textObject



320
321
322
# File 'lib/msgpack/idl/ast.rb', line 320

def text
	"#{@name}.#{@field}"
end