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


498
499
500
# File 'lib/puppet/pops/time/timespan.rb', line 498

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

Instance Method Details

#append_to(bld, ts) ⇒ Object


506
507
508
# File 'lib/puppet/pops/time/timespan.rb', line 506

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

#multiplierObject


502
503
504
# File 'lib/puppet/pops/time/timespan.rb', line 502

def multiplier
  NSECS_PER_MSEC
end