class TooDoo::Application
Application
is the entry point for the app it takes arguments and passes them to a command to spin up the corresponding logic
Attributes
args[R]
command[R]
Public Class Methods
new(args = Arguments.new)
click to toggle source
# File lib/toodoo/application.rb, line 10 def initialize(args = Arguments.new) @args = args @command = recognize_command end
Public Instance Methods
run!()
click to toggle source
# File lib/toodoo/application.rb, line 15 def run! command.new(@args.argument).run! end
Private Instance Methods
recognize_command()
click to toggle source
# File lib/toodoo/application.rb, line 21 def recognize_command Commands::COMMANDS.fetch \ @args.command.to_sym, Commands::Help end