Class: Puppet::Pops::Time::Timespan::Format::DaySegment
- Inherits:
-
ValueSegment
- Object
- Segment
- ValueSegment
- Puppet::Pops::Time::Timespan::Format::DaySegment
- Defined in:
- lib/puppet/pops/time/timespan.rb
Instance Method Summary collapse
- #append_to(bld, ts) ⇒ Object
-
#initialize(padchar, width) ⇒ DaySegment
constructor
A new instance of DaySegment.
- #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) ⇒ DaySegment
Returns a new instance of DaySegment.
420 421 422 |
# File 'lib/puppet/pops/time/timespan.rb', line 420 def initialize(padchar, width) super(padchar, width, 1) end |
Instance Method Details
#append_to(bld, ts) ⇒ Object
428 429 430 |
# File 'lib/puppet/pops/time/timespan.rb', line 428 def append_to(bld, ts) append_value(bld, ts.days) end |
#multiplier ⇒ Object
424 425 426 |
# File 'lib/puppet/pops/time/timespan.rb', line 424 def multiplier NSECS_PER_DAY end |