Class: Johnson::Nodes::TernaryNode
- Defined in:
- lib/johnson/nodes/ternary_node.rb
Instance Attribute Summary collapse
-
#b_then ⇒ Object
Returns the value of attribute b_then.
-
#cond ⇒ Object
Returns the value of attribute cond.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, column, cond, b_then, b_else) ⇒ TernaryNode
constructor
A new instance of TernaryNode.
Methods inherited from Node
#each, #to_dot, #to_ecma, #to_s, #to_sexp
Methods included from Visitable
Constructor Details
#initialize(line, column, cond, b_then, b_else) ⇒ TernaryNode
Returns a new instance of TernaryNode.
12 13 14 15 16 |
# File 'lib/johnson/nodes/ternary_node.rb', line 12 def initialize(line, column, cond, b_then, b_else) super(line, column, b_else) @cond = cond @b_then = b_then end |
Instance Attribute Details
#b_then ⇒ Object
Returns the value of attribute b_then.
11 12 13 |
# File 'lib/johnson/nodes/ternary_node.rb', line 11 def b_then @b_then end |
#cond ⇒ Object
Returns the value of attribute cond.
11 12 13 |
# File 'lib/johnson/nodes/ternary_node.rb', line 11 def cond @cond end |