Class: CukeStepBm::Cli

Inherits:
Object
  • Object
show all
Defined in:
lib/cuke-step-bm/cli.rb

Defined Under Namespace

Classes: Options

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Cli

attr_reader :opt_parser



75
76
77
78
79
80
81
82
83
# File 'lib/cuke-step-bm/cli.rb', line 75

def initialize(args)
  @config = CukeStepBm
  @log_file = @config.log_file
  bm_validate!
  @options = Options.new.parse! args
  @options = default_options.merge @options
  @options[:act] = [ :most ] unless @options[:act]
  #@scope = @options.delete :scope
end

Class Method Details

.execute(args) ⇒ Object



69
70
71
# File 'lib/cuke-step-bm/cli.rb', line 69

def self.execute(args)
  new(args).execute
end

Instance Method Details

#executeObject



85
86
87
88
# File 'lib/cuke-step-bm/cli.rb', line 85

def execute
  parse_bms!
  self.send *@options[:act]
end