Class: MarketplaceKit::CommandDispatcher

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/marketplace_kit/command_dispatcher.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ CommandDispatcher

Returns a new instance of CommandDispatcher.



6
7
8
# File 'lib/marketplace_kit/command_dispatcher.rb', line 6

def initialize(args)
  @args = args
end

Instance Method Details

#executeObject



10
11
12
13
14
# File 'lib/marketplace_kit/command_dispatcher.rb', line 10

def execute
  command.new(command_args).execute
rescue Errors::MarketplaceError => e
  puts e.message.red
end