Class: Refract::IfNode
Instance Attribute Summary collapse
-
#inline ⇒ Object
Returns the value of attribute inline.
-
#predicate ⇒ Object
Returns the value of attribute predicate.
-
#statements ⇒ Object
Returns the value of attribute statements.
-
#subsequent ⇒ Object
Returns the value of attribute subsequent.
Instance Method Summary collapse
-
#initialize(prism_node: nil, predicate:, statements: nil, subsequent: nil, inline:) ⇒ IfNode
constructor
A new instance of IfNode.
Methods inherited from Node
#accept, #copy, #start_line, #type, type
Constructor Details
#initialize(prism_node: nil, predicate:, statements: nil, subsequent: nil, inline:) ⇒ IfNode
Returns a new instance of IfNode.
5 6 7 8 9 10 11 12 |
# File 'lib/refract/nodes/if_node.rb', line 5 def initialize(prism_node: nil, predicate:, statements: nil, subsequent: nil, inline:) @prism_node = prism_node => Prism::Node | nil @predicate = predicate @statements = statements @subsequent = subsequent @inline = inline freeze end |
Instance Attribute Details
#inline ⇒ Object
Returns the value of attribute inline.
14 15 16 |
# File 'lib/refract/nodes/if_node.rb', line 14 def inline @inline end |
#predicate ⇒ Object
Returns the value of attribute predicate.
14 15 16 |
# File 'lib/refract/nodes/if_node.rb', line 14 def predicate @predicate end |
#statements ⇒ Object
Returns the value of attribute statements.
14 15 16 |
# File 'lib/refract/nodes/if_node.rb', line 14 def statements @statements end |
#subsequent ⇒ Object
Returns the value of attribute subsequent.
14 15 16 |
# File 'lib/refract/nodes/if_node.rb', line 14 def subsequent @subsequent end |