Sha256: 196298f13b4eaa58a004e7686ab2d9226da0fe06f3e8fed4a03639fd797c58a4

Contents?: true

Size: 745 Bytes

Versions: 2

Compression:

Stored size: 745 Bytes

Contents

#!/usr/bin/env ruby
require 'codetree'
require 'optparse'

$detail = :medium
$flat = false
$quiet = false

OptionParser.new do |opts|
  opts.banner = "Usage: codetree [options]"

  opts.on("-f", "--[no-]flat", "display flat list/tree") do |v|
    $flat = v
  end
  opts.on("-d", "--detail DETAIL", [:none, :light, :medium , :full],"Specify a detail value ( none, light, medium, full]") do |v|
    $detail = v.to_sym
  end
  opts.on("-q", "--[no-]quiet","Remove node symbols ('*') from output tree/list view") do |v|
    $quiet = v
  end

end.parse!





codetree = Codetree::ParseTree.new(Dir['lib/*/*/*/*.rb'] + Dir['lib/*/*/*.rb'] + Dir['lib/*/*.rb'] + Dir['lib/*.rb'])
codetree.print_tree :detail => $detail, :flat => $flat, :quiet => $quiet

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
codetree-0.0.3 bin/codetree
codetree-0.0.2 bin/codetree