Class: Horologium::Configuration

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_precisionSymbol

Returns the default precision, :standard until configured.

Returns:

  • (Symbol)

    the default precision, :standard until configured



10
11
12
# File 'lib/horologium/configuration.rb', line 10

def default_precision
  @default_precision
end