Class: Puppet::Pops::Time::Timespan::Format::MilliSecondSegment

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

Instance Method Summary collapse

Methods inherited from FragmentSegment

#append_value, #create_format, #nanoseconds

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) ⇒ MilliSecondSegment

Returns a new instance of MilliSecondSegment.



504
505
506
# File 'lib/puppet/pops/time/timespan.rb', line 504

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

Instance Method Details

#append_to(bld, ts) ⇒ Object



512
513
514
# File 'lib/puppet/pops/time/timespan.rb', line 512

def append_to(bld, ts)
  append_value(bld, use_total? ? ts.total_milliseconds : ts.milliseconds)
end

#multiplierObject



508
509
510
# File 'lib/puppet/pops/time/timespan.rb', line 508

def multiplier
  NSECS_PER_MSEC
end