Class: Lhj::Command::Filepath

Inherits:
Lhj::Command
  • Object
show all
Defined in:
lib/lhj/command/file_path.rb

Overview

show file path

Instance Method Summary collapse

Methods inherited from Lhj::Command

#auto_spin, #begin_title, #run, #stop

Constructor Details

#initialize(argv) ⇒ Filepath

Returns a new instance of Filepath.



9
10
11
12
# File 'lib/lhj/command/file_path.rb', line 9

def initialize(argv)
  @current_path = argv.shift_argument || Dir.pwd
  super
end

Instance Method Details

#handleObject



14
15
16
17
# File 'lib/lhj/command/file_path.rb', line 14

def handle
  tree = Lhj::Tree.new(@current_path)
  puts tree.render
end