class Glaemscribe::API::IfTree::CodeBlock
Attributes
parent_if_cond[RW]
terms[RW]
Public Class Methods
new(parent_if_cond = nil)
click to toggle source
# File lib/api/if_tree.rb, line 138 def initialize(parent_if_cond = nil) @parent_if_cond = parent_if_cond @terms = [] end
Public Instance Methods
inspect()
click to toggle source
# File lib/api/if_tree.rb, line 148 def inspect ret = "" ret += "|-ROOT\n" if !parent_if_cond ret += "#{prefix} Code block\n" + @terms.map{|t| t.inspect}.join("\n") end
offset()
click to toggle source
# File lib/api/if_tree.rb, line 142 def offset ((parent_if_cond)?(parent_if_cond.offset):("")) + " " end
prefix()
click to toggle source
# File lib/api/if_tree.rb, line 145 def prefix offset + "|- " end