Class: AbstractSyntaxTreeKit::Node::WHEN
- Inherits:
-
AbstractSyntaxTreeKit::Node
- Object
- AbstractSyntaxTreeKit::Node
- AbstractSyntaxTreeKit::Node::WHEN
- Defined in:
- lib/astkit/node/when.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#els ⇒ Object
readonly
Returns the value of attribute els.
-
#expressions ⇒ Object
readonly
Returns the value of attribute expressions.
Attributes inherited from AbstractSyntaxTreeKit::Node
#children, #condition, #first_column, #first_lineno, #last_column, #last_lineno, #type
Instance Method Summary collapse
-
#initialize(node:, expressions:, body:, els: nil) ⇒ WHEN
constructor
A new instance of WHEN.
Constructor Details
#initialize(node:, expressions:, body:, els: nil) ⇒ WHEN
Returns a new instance of WHEN.
6 7 8 9 10 11 |
# File 'lib/astkit/node/when.rb', line 6 def initialize(node:, expressions:, body:, els: nil) super(node) @expressions = expressions @body = body @els = els end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
4 5 6 |
# File 'lib/astkit/node/when.rb', line 4 def body @body end |
#els ⇒ Object (readonly)
Returns the value of attribute els.
4 5 6 |
# File 'lib/astkit/node/when.rb', line 4 def els @els end |
#expressions ⇒ Object (readonly)
Returns the value of attribute expressions.
4 5 6 |
# File 'lib/astkit/node/when.rb', line 4 def expressions @expressions end |