Class: Benny::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/benny/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/benny/cli.rb', line 8

def self.exit_on_failure?
  true
end

Instance Method Details

#allObject



20
21
22
23
24
# File 'lib/benny/cli.rb', line 20

def all
  require 'benny'
  Benny.load_env
  Benny.execute
end

#executeObject



29
30
31
32
33
34
35
# File 'lib/benny/cli.rb', line 29

def execute
  require 'benny'
  Benny.load_env
  Executors::Benchmark.execute(benchmarks: Benny.benchmarks,
                               reporter: Reporters::File.new(env_name: options['env-name'],
                                                             path: options['result-path']))
end

#init(name) ⇒ Object



14
15
16
17
# File 'lib/benny/cli.rb', line 14

def init(name)
  require_relative 'init'
  Init.create(name)
end