Class: AbstractSyntaxTreeKit::Node::WHILE

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

Instance Attribute Summary collapse

Attributes inherited from AbstractSyntaxTreeKit::Node

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

Instance Method Summary collapse

Constructor Details

#initialize(node:, condition:, body:) ⇒ WHILE

Returns a new instance of WHILE.



6
7
8
9
10
# File 'lib/astkit/node/while.rb', line 6

def initialize(node:, condition:, body:)
  super(node)
  @condition = condition
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



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

def body
  @body
end

#conditionObject (readonly)

Returns the value of attribute condition.



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

def condition
  @condition
end