Class: Puppet::Pops::Time::Timespan::Format::SecondSegment
- Inherits:
-
ValueSegment
- Object
- Segment
- ValueSegment
- Puppet::Pops::Time::Timespan::Format::SecondSegment
- Defined in:
- lib/puppet/pops/time/timespan.rb
Instance Method Summary collapse
- #append_to(bld, ts) ⇒ Object
-
#initialize(padchar, width) ⇒ SecondSegment
constructor
A new instance of SecondSegment.
- #multiplier ⇒ Object
Methods inherited from ValueSegment
#append_regexp, #append_value, #create_format, #nanoseconds, #set_use_total, #use_total?
Methods inherited from Segment
Constructor Details
#initialize(padchar, width) ⇒ SecondSegment
Returns a new instance of SecondSegment.
457 458 459 |
# File 'lib/puppet/pops/time/timespan.rb', line 457 def initialize(padchar, width) super(padchar, width, 2) end |
Instance Method Details
#append_to(bld, ts) ⇒ Object
465 466 467 |
# File 'lib/puppet/pops/time/timespan.rb', line 465 def append_to(bld, ts) append_value(bld, use_total? ? ts.total_seconds : ts.seconds) end |
#multiplier ⇒ Object
461 462 463 |
# File 'lib/puppet/pops/time/timespan.rb', line 461 def multiplier NSECS_PER_SEC end |