Class: Puppet::Pops::Time::Timespan::Format::HourSegment
- Inherits:
-
ValueSegment
- Object
- Segment
- ValueSegment
- Puppet::Pops::Time::Timespan::Format::HourSegment
- Defined in:
- lib/puppet/pops/time/timespan.rb
Instance Method Summary collapse
- #append_to(bld, ts) ⇒ Object
-
#initialize(padchar, width) ⇒ HourSegment
constructor
A new instance of HourSegment.
- #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) ⇒ HourSegment
Returns a new instance of HourSegment.
429 430 431 |
# File 'lib/puppet/pops/time/timespan.rb', line 429 def initialize(padchar, width) super(padchar, width, 2) end |
Instance Method Details
#append_to(bld, ts) ⇒ Object
437 438 439 |
# File 'lib/puppet/pops/time/timespan.rb', line 437 def append_to(bld, ts) append_value(bld, use_total? ? ts.total_hours : ts.hours) end |
#multiplier ⇒ Object
433 434 435 |
# File 'lib/puppet/pops/time/timespan.rb', line 433 def multiplier NSECS_PER_HOUR end |