Class: Puppet::Pops::Time::Timespan::Format::MinuteSegment

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

Returns a new instance of MinuteSegment.


445
446
447
# File 'lib/puppet/pops/time/timespan.rb', line 445

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

Instance Method Details

#append_to(bld, ts) ⇒ Object


453
454
455
# File 'lib/puppet/pops/time/timespan.rb', line 453

def append_to(bld, ts)
  append_value(bld, use_total? ? ts.total_minutes : ts.minutes)
end

#multiplierObject


449
450
451
# File 'lib/puppet/pops/time/timespan.rb', line 449

def multiplier
  NSECS_PER_MIN
end