Module: Cuporter::Formatters::Util

Included in:
Csv, Text
Defined in:
lib/cuporter/formatters/text.rb

Instance Method Summary collapse

Instance Method Details

#depth(node) ⇒ Object



10
11
12
# File 'lib/cuporter/formatters/text.rb', line 10

def depth(node)
  node.parent.path.sub(/^.*\/report/, 'report').split('/').size#- 2
end

#terminal_widthObject



6
7
8
# File 'lib/cuporter/formatters/text.rb', line 6

def terminal_width
  @@terminal_width ||= (`tput cols` || 120).to_i
end