Class: Chelsy::Labeled
Overview
== 6.8.1 Labeled statements
Direct Known Subclasses
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#stmt ⇒ Object
readonly
Returns the value of attribute stmt.
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(label, stmt, **rest) ⇒ Labeled
constructor
A new instance of Labeled.
Constructor Details
#initialize(label, stmt, **rest) ⇒ Labeled
Returns a new instance of Labeled.
943 944 945 946 947 |
# File 'lib/chelsy/ast.rb', line 943 def initialize(label, stmt, **rest) @label = Syntax::Ident.ensure(label) @stmt = Syntax::Stmt.ensure(stmt) super **rest end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
941 942 943 |
# File 'lib/chelsy/ast.rb', line 941 def label @label end |
#stmt ⇒ Object (readonly)
Returns the value of attribute stmt.
941 942 943 |
# File 'lib/chelsy/ast.rb', line 941 def stmt @stmt end |