Module: Cuporter::Formatters::Util
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_width ⇒ Object
6 7 8 |
# File 'lib/cuporter/formatters/text.rb', line 6 def terminal_width @@terminal_width ||= (`tput cols` || 120).to_i end |