Class: IDL::Expression::Enumerator

Inherits:
IDL::Expression show all
Defined in:
lib/ridl/expression.rb

Instance Attribute Summary collapse

Attributes inherited from IDL::Expression

#idltype, #value

Instance Method Summary collapse

Methods inherited from IDL::Expression

#instantiate, #is_template?, #typename

Constructor Details

#initialize(node) ⇒ Enumerator

Returns a new instance of Enumerator.



76
77
78
79
80
81
82
83
84
85
# File 'lib/ridl/expression.rb', line 76

def initialize(node)
  if $DEBUG
    unless IDL::AST::Enumerator === node
      raise "#{node.scoped_name} must be enumerator: #{node.class.name}."
    end
  end
  @node = node
  @idltype = node.idltype
  @value = node.value
end

Instance Attribute Details

#nodeObject (readonly)

Returns the value of attribute node.



74
75
76
# File 'lib/ridl/expression.rb', line 74

def node
  @node
end