Class: Glaemscribe::API::IfTree::Term

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

Overview

A node (code lines / preprocessor operators / … ) A node may have children or not depending on their nature

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent_code_block) ⇒ Term

Returns a new instance of Term.



59
60
61
# File 'lib/api/if_tree.rb', line 59

def initialize(parent_code_block)
  @parent_code_block = parent_code_block  
end

Instance Attribute Details

#parent_code_blockObject

Returns the value of attribute parent_code_block.



58
59
60
# File 'lib/api/if_tree.rb', line 58

def parent_code_block
  @parent_code_block
end

Instance Method Details

#is_code_lines?Boolean

Returns:

  • (Boolean)


62
63
64
# File 'lib/api/if_tree.rb', line 62

def is_code_lines?
  false
end

#is_macro_deploy?Boolean

Returns:

  • (Boolean)


68
69
70
# File 'lib/api/if_tree.rb', line 68

def is_macro_deploy?
  false
end

#is_pre_post_processor_operators?Boolean

Returns:

  • (Boolean)


65
66
67
# File 'lib/api/if_tree.rb', line 65

def is_pre_post_processor_operators?
  false
end

#offsetObject



71
72
73
# File 'lib/api/if_tree.rb', line 71

def offset
  parent_code_block.offset + " "
end

#prefixObject



74
75
76
# File 'lib/api/if_tree.rb', line 74

def prefix
  offset + "|- "
end