Class: Puppet::Pops::Time::Timespan::Format::DaySegment

Inherits:
ValueSegment show all
Defined in:
lib/puppet/pops/time/timespan.rb

Instance Method Summary collapse

Methods inherited from ValueSegment

#append_regexp, #append_value, #create_format, #nanoseconds, #set_use_total, #use_total?

Methods inherited from Segment

#append_regexp

Constructor Details

#initialize(padchar, width) ⇒ DaySegment

Returns a new instance of DaySegment.



415
416
417
# File 'lib/puppet/pops/time/timespan.rb', line 415

def initialize(padchar, width)
  super(padchar, width, 1)
end

Instance Method Details

#append_to(bld, ts) ⇒ Object



423
424
425
# File 'lib/puppet/pops/time/timespan.rb', line 423

def append_to(bld, ts)
  append_value(bld, ts.days)
end

#multiplierObject



419
420
421
# File 'lib/puppet/pops/time/timespan.rb', line 419

def multiplier
  NSECS_PER_DAY
end