Class: TreeRepl::Pwd

Inherits:
Cmd
  • Object
show all
Defined in:
lib/treerepl/cmds.rb

Instance Attribute Summary

Attributes inherited from Cmd

#name, #repl

Instance Method Summary collapse

Constructor Details

#initialize(repl) ⇒ Pwd

Returns a new instance of Pwd.



69
70
71
# File 'lib/treerepl/cmds.rb', line 69

def initialize(repl)
  super(repl,'pwd')
end

Instance Method Details

#exec(args) ⇒ Object



72
73
74
# File 'lib/treerepl/cmds.rb', line 72

def exec(args)
  puts cwd
end

#helpObject



75
76
77
# File 'lib/treerepl/cmds.rb', line 75

def help
  'Print the current working directory'
end