Class: RBelly::Nodes::IfNode
Direct Known Subclasses
Instance Attribute Summary collapse
-
#conditions ⇒ Object
readonly
Returns the value of attribute conditions.
-
#else ⇒ Object
readonly
Returns the value of attribute else.
Attributes inherited from Node
#comments, #filename, #line, #value
Instance Method Summary collapse
-
#initialize(conditions, value, else_stmt = nil) ⇒ IfNode
constructor
A new instance of IfNode.
Methods inherited from Node
#==, #===, #each, #pointcut, #to_dots, #to_ecma, #to_real_sexp, #to_sexp
Methods included from Visitable
Constructor Details
#initialize(conditions, value, else_stmt = nil) ⇒ IfNode
Returns a new instance of IfNode.
5 6 7 8 9 |
# File 'lib/rbelly/nodes/if_node.rb', line 5 def initialize(conditions, value, else_stmt = nil) super(value) @conditions = conditions @else = else_stmt end |
Instance Attribute Details
#conditions ⇒ Object (readonly)
Returns the value of attribute conditions.
4 5 6 |
# File 'lib/rbelly/nodes/if_node.rb', line 4 def conditions @conditions end |
#else ⇒ Object (readonly)
Returns the value of attribute else.
4 5 6 |
# File 'lib/rbelly/nodes/if_node.rb', line 4 def else @else end |