Class: Takoyaki::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/takoyaki/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = []) ⇒ Runner

Returns a new instance of Runner.



14
15
16
# File 'lib/takoyaki/runner.rb', line 14

def initialize(args = [])
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



12
13
14
# File 'lib/takoyaki/runner.rb', line 12

def args
  @args
end

Instance Method Details

#commandObject



25
26
27
# File 'lib/takoyaki/runner.rb', line 25

def command
  args.first
end

#runObject



18
19
20
21
22
23
# File 'lib/takoyaki/runner.rb', line 18

def run
  case command
  when "activities"
    Commands::Activities.new.execute
  end
end