Class: TFA::Console

Inherits:
Object
  • Object
show all
Defined in:
lib/tfa/console.rb

Instance Method Summary collapse

Constructor Details

#initialize(filename = "tfa") ⇒ Console

Returns a new instance of Console.



3
4
5
# File 'lib/tfa/console.rb', line 3

def initialize(filename = "tfa")
  @storage = Storage.new(filename)
end

Instance Method Details

#run(arguments) ⇒ Object



7
8
9
10
# File 'lib/tfa/console.rb', line 7

def run(arguments)
  command_name = arguments.first
  command_for(command_name).run(arguments - [command_name])
end