Class: UnitMeasurements::Configuration
- Inherits:
-
Object
- Object
- UnitMeasurements::Configuration
- Defined in:
- lib/unit_measurements/configuration.rb
Overview
Note:
This class is responsible for configuring globally configurable options of unit_measurements.
The UnitMeasurements::Configuration
class maintains and manages the globally configurable options of unit_measurements.
Instance Attribute Summary collapse
-
#use_cache ⇒ TrueClass|FalseClass
Get the current value of the
use_cache
option.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
Initializes a new
Configuration
instance with default values of configurable options.
Constructor Details
#initialize ⇒ Configuration
Initializes a new Configuration
instance with default values of configurable options.
35 36 37 |
# File 'lib/unit_measurements/configuration.rb', line 35 def initialize self.use_cache = false end |
Instance Attribute Details
#use_cache ⇒ TrueClass|FalseClass
Note:
This option controls whether caching is enabled for converting measurements. Defaults to false
.
Get the current value of the use_cache
option.
28 29 30 |
# File 'lib/unit_measurements/configuration.rb', line 28 def use_cache @use_cache end |