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