Module: RubyUnits
- Defined in:
- lib/ruby_units/date.rb,
lib/ruby_units/math.rb,
lib/ruby_units/time.rb,
lib/ruby_units/unit.rb,
lib/ruby_units/array.rb,
lib/ruby_units/cache.rb,
lib/ruby_units/string.rb,
lib/ruby_units/numeric.rb,
lib/ruby_units/version.rb,
lib/ruby_units/configuration.rb
Defined Under Namespace
Modules: Array, Date, Math, Numeric, String, Time Classes: Cache, Configuration, Unit
Class Attribute Summary collapse
Class Method Summary collapse
-
.configure {|configuration| ... } ⇒ Object
allow for optional configuration of RubyUnits.
-
.reset ⇒ Object
Reset the configuration to the default values.
Class Attribute Details
.configuration ⇒ Object
8 9 10 |
# File 'lib/ruby_units/configuration.rb', line 8 def self.configuration @configuration ||= Configuration.new end |
Class Method Details
.configure {|configuration| ... } ⇒ Object
allow for optional configuration of RubyUnits
Usage:
RubyUnits.configure do |config|
config.separator = false
end
24 25 26 |
# File 'lib/ruby_units/configuration.rb', line 24 def self.configure yield configuration end |
.reset ⇒ Object
Reset the configuration to the default values
13 14 15 |
# File 'lib/ruby_units/configuration.rb', line 13 def self.reset @configuration = Configuration.new end |