Class: BenchTool::Dispatcher
- Inherits:
-
Object
- Object
- BenchTool::Dispatcher
- Defined in:
- lib/benchtool/dispatcher.rb
Instance Method Summary collapse
-
#benchmark ⇒ Object
Each command gets a method here.
-
#initialize(options = {}) ⇒ Dispatcher
constructor
A new instance of Dispatcher.
- #test ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Dispatcher
Returns a new instance of Dispatcher.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/benchtool/dispatcher.rb', line 4 def initialize( = {}) @appconfig = AppConfig.new.to_hash @config = @appconfig[:configuration] @targets = @appconfig[:targets] @options = # Overwrite app config with options (usually passed as CLI options) unless .nil? @config.merge!() end end |
Instance Method Details
#benchmark ⇒ Object
Each command gets a method here
17 18 19 20 |
# File 'lib/benchtool/dispatcher.rb', line 17 def benchmark setup_output benchmark_target(select_target) end |
#test ⇒ Object
22 23 24 |
# File 'lib/benchtool/dispatcher.rb', line 22 def test test_target(select_target) end |