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.



70
71
72
73
74
75
76
77
78
79
80
# File 'lib/ridl/expression.rb', line 70

def initialize(node)
  if $DEBUG
    if not IDL::AST::Enumerator === node
      raise RuntimeError,
        "#{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.



69
70
71
# File 'lib/ridl/expression.rb', line 69

def node
  @node
end