Class: MessagePack::IDL::AST::EnumField

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Element

#summary

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

#idObject (readonly)

Returns the value of attribute id.



146
147
148
# File 'lib/msgpack/idl/ast.rb', line 146

def id
  @id
end

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

#textObject



148
149
150
# File 'lib/msgpack/idl/ast.rb', line 148

def text
	"#{@id}: #{@name}"
end