Class: MessagePack::IDL::AST::ValueAssignedField

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

Instance Attribute Summary collapse

Attributes inherited from Field

#id, #modifier, #name, #type

Instance Method Summary collapse

Methods inherited from Element

#summary

Constructor Details

#initialize(id, type, modifier, name, value) ⇒ ValueAssignedField

Returns a new instance of ValueAssignedField.



114
115
116
117
# File 'lib/msgpack/idl/ast.rb', line 114

def initialize(id, type, modifier, name, value)
	super(id, type, modifier, name)
	@value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



118
119
120
# File 'lib/msgpack/idl/ast.rb', line 118

def value
  @value
end

Instance Method Details

#textObject



120
121
122
# File 'lib/msgpack/idl/ast.rb', line 120

def text
	"#{super} = #{@value.text}"
end