Class: AbstractSyntaxTreeKit::Node::WHEN

Inherits:
AbstractSyntaxTreeKit::Node show all
Defined in:
lib/astkit/node/when.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractSyntaxTreeKit::Node

#children, #condition, #first_column, #first_lineno, #last_column, #last_lineno, #type

Instance Method Summary collapse

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

#bodyObject (readonly)

Returns the value of attribute body.



4
5
6
# File 'lib/astkit/node/when.rb', line 4

def body
  @body
end

#elsObject (readonly)

Returns the value of attribute els.



4
5
6
# File 'lib/astkit/node/when.rb', line 4

def els
  @els
end

#expressionsObject (readonly)

Returns the value of attribute expressions.



4
5
6
# File 'lib/astkit/node/when.rb', line 4

def expressions
  @expressions
end