Module: Clock::ISO8601

Extended by:
ISO8601
Included in:
Clock, ISO8601
Defined in:
lib/clock/clock.rb

Defined Under Namespace

Modules: Defaults

Instance Method Summary collapse

Instance Method Details

#iso8601(time = nil, precision: nil, system_time: nil) ⇒ Object



75
76
77
78
79
# File 'lib/clock/clock.rb', line 75

def iso8601(time=nil, precision: nil, system_time: nil)
  precision ||= self.precision
  time ||= now(system_time: system_time)
  time.iso8601(precision)
end

#precisionObject



81
82
83
# File 'lib/clock/clock.rb', line 81

def precision
  Defaults.precision
end