Class: Chelsy::EnumMember

Inherits:
Element show all
Defined in:
lib/chelsy/ast.rb

Instance Attribute Summary collapse

Attributes inherited from Element

#fragments, #post_fragments

Instance Method Summary collapse

Constructor Details

#initialize(name, init = nil, **rest) ⇒ EnumMember

Returns a new instance of EnumMember.



173
174
175
176
177
# File 'lib/chelsy/ast.rb', line 173

def initialize(name, init=nil, **rest)
  @name = name.to_sym
  @init = init
  super **rest
end

Instance Attribute Details

#initObject (readonly)

Returns the value of attribute init.



171
172
173
# File 'lib/chelsy/ast.rb', line 171

def init
  @init
end

#nameObject (readonly)

Returns the value of attribute name.



171
172
173
# File 'lib/chelsy/ast.rb', line 171

def name
  @name
end