Class: Estreet::LabeledStatement
- Defined in:
- lib/estreet/labeled_statement.rb
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(label, body) ⇒ LabeledStatement
constructor
A new instance of LabeledStatement.
Methods inherited from Statement
Methods inherited from Node
Constructor Details
#initialize(label, body) ⇒ LabeledStatement
Returns a new instance of LabeledStatement.
3 4 5 6 7 |
# File 'lib/estreet/labeled_statement.rb', line 3 def initialize(label, body) @label = Identifier.new(label) @body = body.to_statement end |
Instance Method Details
#attributes ⇒ Object
9 10 11 12 13 14 |
# File 'lib/estreet/labeled_statement.rb', line 9 def attributes super.merge( label: @label, body: @body ) end |