Class: TreeRepl::Cmd

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

Direct Known Subclasses

Cat, Cd, Help, Ls, Pwd, Quit, Use

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repl, name) ⇒ Cmd

Returns a new instance of Cmd.



5
6
7
8
# File 'lib/treerepl/cmds.rb', line 5

def initialize(repl,name)
  @repl = repl
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/treerepl/cmds.rb', line 4

def name
  @name
end

#replObject (readonly)

Returns the value of attribute repl.



4
5
6
# File 'lib/treerepl/cmds.rb', line 4

def repl
  @repl
end

Instance Method Details

#exec(args) ⇒ Object



12
13
14
# File 'lib/treerepl/cmds.rb', line 12

def exec(args)
  raise 'Implement exec(string[])'
end

#helpObject



9
10
11
# File 'lib/treerepl/cmds.rb', line 9

def help
  raise 'Implement help()'
end