Class: Scheman::CommandBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/scheman/command_builder.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ CommandBuilder

Returns a new instance of CommandBuilder.

Parameters:

  • argv (Array)

    ARGV



8
9
10
# File 'lib/scheman/command_builder.rb', line 8

def initialize(argv)
  @argv = argv
end

Class Method Details

.call(*args) ⇒ Object



3
4
5
# File 'lib/scheman/command_builder.rb', line 3

def self.call(*args)
  new(*args).call
end

Instance Method Details

#callScheman::Commands::Base



13
14
15
16
17
# File 'lib/scheman/command_builder.rb', line 13

def call
  command_class.new(@argv)
rescue Errors::CommandNotFound
  terminate
end