Class: Puppet::Pops::Time::Timespan::Format::MilliSecondSegment
- Inherits:
-
FragmentSegment
- Object
- Segment
- ValueSegment
- FragmentSegment
- Puppet::Pops::Time::Timespan::Format::MilliSecondSegment
- Defined in:
- lib/puppet/pops/time/timespan.rb
Instance Method Summary collapse
- #append_to(bld, ts) ⇒ Object
-
#initialize(padchar, width) ⇒ MilliSecondSegment
constructor
A new instance of MilliSecondSegment.
- #multiplier ⇒ Object
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
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 |
#multiplier ⇒ Object
508 509 510 |
# File 'lib/puppet/pops/time/timespan.rb', line 508 def multiplier NSECS_PER_MSEC end |