Class: Glaemscribe::API::IfTree::IfTerm
Overview
A ifterm may have multiple ifconds (if,elsif,elsif,…,else)
Instance Attribute Summary collapse
-
#if_conds ⇒ Object
Returns the value of attribute if_conds.
Attributes inherited from Term
Instance Method Summary collapse
-
#initialize(parent_code_block) ⇒ IfTerm
constructor
A new instance of IfTerm.
- #inspect ⇒ Object
Methods inherited from Term
#is_code_lines?, #is_macro_deploy?, #is_pre_post_processor_operators?, #offset, #prefix
Constructor Details
#initialize(parent_code_block) ⇒ IfTerm
Returns a new instance of IfTerm.
82 83 84 85 |
# File 'lib/api/if_tree.rb', line 82 def initialize(parent_code_block) super(parent_code_block) @if_conds = [] end |
Instance Attribute Details
#if_conds ⇒ Object
Returns the value of attribute if_conds.
81 82 83 |
# File 'lib/api/if_tree.rb', line 81 def if_conds @if_conds end |
Instance Method Details
#inspect ⇒ Object
86 87 88 89 |
# File 'lib/api/if_tree.rb', line 86 def inspect "#{prefix} CONDITIONAL BLOCK\n" + @if_conds.map{ |c| c.inspect }.join("\n") end |