Class: Takoyaki::Runner
- Inherits:
-
Object
- Object
- Takoyaki::Runner
- Defined in:
- lib/takoyaki/runner.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
Instance Method Summary collapse
- #command ⇒ Object
-
#initialize(args = []) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(args = []) ⇒ Runner
14 15 16 |
# File 'lib/takoyaki/runner.rb', line 14 def initialize(args = []) @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
12 13 14 |
# File 'lib/takoyaki/runner.rb', line 12 def args @args end |
Instance Method Details
#command ⇒ Object
27 28 29 |
# File 'lib/takoyaki/runner.rb', line 27 def command args.first end |
#run ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/takoyaki/runner.rb', line 18 def run case command when "activities" Commands::Activities.new.execute when "reviews" Commands::Reviews.new(*args[1..-1]).execute end end |