Class: Layo::Ast::Block
Instance Attribute Summary collapse
-
#statement_list ⇒ Object
readonly
Returns the value of attribute statement_list.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(statement_list = []) ⇒ Block
constructor
A new instance of Block.
Constructor Details
#initialize(statement_list = []) ⇒ Block
Returns a new instance of Block.
5 6 7 |
# File 'lib/layo/ast/block.rb', line 5 def initialize(statement_list = []) @statement_list = statement_list end |
Instance Attribute Details
#statement_list ⇒ Object (readonly)
Returns the value of attribute statement_list.
3 4 5 |
# File 'lib/layo/ast/block.rb', line 3 def statement_list @statement_list end |
Instance Method Details
#each ⇒ Object
9 10 11 |
# File 'lib/layo/ast/block.rb', line 9 def each @statement_list.each { |stmt| yield(stmt) } end |