Class: ActionLogic::ActionConfiguration
- Inherits:
-
Object
- Object
- ActionLogic::ActionConfiguration
- Defined in:
- lib/action_logic/action_configuration.rb
Class Method Summary collapse
- .benchmark? ⇒ Boolean
- .benchmark_formatter ⇒ Object
- .benchmark_log ⇒ Object
- .configuration_options ⇒ Object
- .configure(&block) ⇒ Object
- .custom_benchmark_formatter ⇒ Object
- .default_formatter ⇒ Object
- .reset! ⇒ Object
Class Method Details
.benchmark? ⇒ Boolean
13 14 15 |
# File 'lib/action_logic/action_configuration.rb', line 13 def self.benchmark? .benchmark || false end |
.benchmark_formatter ⇒ Object
21 22 23 |
# File 'lib/action_logic/action_configuration.rb', line 21 def self.benchmark_formatter custom_benchmark_formatter || default_formatter end |
.benchmark_log ⇒ Object
17 18 19 |
# File 'lib/action_logic/action_configuration.rb', line 17 def self.benchmark_log .benchmark_log || $stdout end |
.configuration_options ⇒ Object
9 10 11 |
# File 'lib/action_logic/action_configuration.rb', line 9 def self. @configuration_options ||= OpenStruct.new end |
.configure(&block) ⇒ Object
5 6 7 |
# File 'lib/action_logic/action_configuration.rb', line 5 def self.configure(&block) block.call() end |
.custom_benchmark_formatter ⇒ Object
31 32 33 34 |
# File 'lib/action_logic/action_configuration.rb', line 31 def self.custom_benchmark_formatter @custom_benchmark_formatter ||= .benchmark_formatter && .benchmark_formatter.new end |
.default_formatter ⇒ Object
36 37 38 |
# File 'lib/action_logic/action_configuration.rb', line 36 def self.default_formatter @default_formatter ||= ::ActionLogic::ActionBenchmark::DefaultFormatter.new end |
.reset! ⇒ Object
25 26 27 28 29 |
# File 'lib/action_logic/action_configuration.rb', line 25 def self.reset! @configuration_options = OpenStruct.new @custom_benchmark_formatter = nil @default_formatter = nil end |