module ActionLogic

Constants

VERSION

Public Class Methods

benchmark?() click to toggle source
# File lib/action_logic/configuration.rb, line 14
def self.benchmark?
  configuration_options.benchmark || false
end
benchmark_formatter() click to toggle source
# File lib/action_logic/configuration.rb, line 22
def self.benchmark_formatter
  custom_benchmark_formatter || default_formatter
end
benchmark_handler() click to toggle source
# File lib/action_logic/configuration.rb, line 26
def self.benchmark_handler
  configuration_options.benchmark_handler || ActionBenchmark::DefaultBenchmarkHandler.new
end
benchmark_log() click to toggle source
# File lib/action_logic/configuration.rb, line 18
def self.benchmark_log
  configuration_options.benchmark_log || $stdout
end
configuration_options() click to toggle source
# File lib/action_logic/configuration.rb, line 10
def self.configuration_options
  @configuration_options ||= OpenStruct.new
end
configure(&block) click to toggle source
# File lib/action_logic/configuration.rb, line 6
def self.configure(&block)
  block.call(configuration_options)
end
custom_benchmark_formatter() click to toggle source
# File lib/action_logic/configuration.rb, line 36
def self.custom_benchmark_formatter
  @custom_benchmark_formatter ||= configuration_options.benchmark_formatter &&
    configuration_options.benchmark_formatter.new
end
default_formatter() click to toggle source
# File lib/action_logic/configuration.rb, line 41
def self.default_formatter
  @default_formatter ||= ActionBenchmark::DefaultFormatter.new
end
reset!() click to toggle source
# File lib/action_logic/configuration.rb, line 30
def self.reset!
  @configuration_options = OpenStruct.new
  @custom_benchmark_formatter = nil
  @default_formatter = nil
end