Class: Horologium::Configuration
- Inherits:
-
Object
- Object
- Horologium::Configuration
- Defined in:
- lib/horologium/configuration.rb,
sig/horologium/configuration.rbs
Overview
Holds the library's settings. Today that is a single value, the default precision new instants and durations take when none is asked for. It is set once, inside configure, and frozen afterwards, so behaviour does not depend on when in the process' life an object is read.
Instance Attribute Summary collapse
-
#default_precision ⇒ Symbol
The default precision,
:standarduntil configured.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 |
# File 'lib/horologium/configuration.rb', line 12 def initialize @default_precision = :standard end |
Instance Attribute Details
#default_precision ⇒ Symbol
Returns the default precision, :standard until configured.
10 11 12 |
# File 'lib/horologium/configuration.rb', line 10 def default_precision @default_precision end |