Module: BetterFx
- Defined in:
- lib/better_fx.rb,
lib/better_fx/client.rb,
lib/better_fx/version.rb,
lib/better_fx/measurement.rb,
lib/better_fx/configuration.rb
Defined Under Namespace
Modules: Measurement Classes: Client, Configuration
Constant Summary collapse
- VERSION =
"2.0.0".freeze
- VERSION_DATE =
"2017-04-03".freeze
Class Method Summary collapse
-
.configuration ⇒ Configuration
Returns the singleton class’s configuration object.
-
.configure(opts = {}) {|configuration| ... } ⇒ Configuration
Allows the user to set configuration options by yielding the configuration block.
-
.configured? ⇒ Bool
Returns true if BetterFx has been configured, false otherwise.
Class Method Details
.configuration ⇒ Configuration
Returns the singleton class’s configuration object
23 24 25 |
# File 'lib/better_fx.rb', line 23 def configuration @configuration ||= Configuration.new end |
.configure(opts = {}) {|configuration| ... } ⇒ Configuration
Allows the user to set configuration options
by yielding the configuration block
14 15 16 17 18 |
# File 'lib/better_fx.rb', line 14 def configure(opts = {}) @configuration = nil if opts.key?(:reset) && opts[:reset] yield(configuration) if block_given? configuration end |
.configured? ⇒ Bool
Returns true if BetterFx has been configured, false otherwise
30 31 32 |
# File 'lib/better_fx.rb', line 30 def configured? !@configuration.nil? end |