Class: Crokus::DesignUnit

Inherits:
Ast
  • Object
show all
Defined in:
lib/crokus/ast.rb

Overview

.….…. AST nodes .….…..

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ast

#accept, #str

Constructor Details

#initialize(list = []) ⇒ DesignUnit

Returns a new instance of DesignUnit.



19
20
21
# File 'lib/crokus/ast.rb', line 19

def initialize list=[]
  @list=list
end

Instance Attribute Details

#listObject

Returns the value of attribute list.



18
19
20
# File 'lib/crokus/ast.rb', line 18

def list
  @list
end

Instance Method Details

#<<(e) ⇒ Object



23
24
25
26
# File 'lib/crokus/ast.rb', line 23

def <<(e)
  list << e
  list.flatten!
end