Class: Glaemscribe::API::IfTree::IfTerm

Inherits:
Term show all
Defined in:
lib/api/if_tree.rb

Overview

A ifterm may have multiple ifconds (if,elsif,elsif,…,else)

Instance Attribute Summary collapse

Attributes inherited from Term

#parent_code_block

Instance Method Summary collapse

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_condsObject

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

#inspectObject



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