Class: Vertigo::Else

Inherits:
AstNode show all
Defined in:
lib/vertigo/ast.rb,
lib/vertigo/ast_vertigo_rkgen.rb

Instance Attribute Summary collapse

Attributes inherited from AstNode

#label, #pos

Instance Method Summary collapse

Methods inherited from AstNode

#accept, #str

Constructor Details

#initialize(body = nil) ⇒ Else

Returns a new instance of Else.



246
247
248
# File 'lib/vertigo/ast_vertigo_rkgen.rb', line 246

def initialize body=nil
  @body=body
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



245
246
247
# File 'lib/vertigo/ast_vertigo_rkgen.rb', line 245

def body
  @body
end

Instance Method Details

#<<(e) ⇒ Object



33
34
35
36
# File 'lib/vertigo/ast.rb', line 33

def <<(e)
  @body||=Body.new
  @body << e
end