class Rtasklib::Models::TWDuration

A subclass of the ISO8601::Duration object that use `task calc` to parse string names like 'weekly', 'biannual', and '3 quarters'

Modifies the initialize method, preserving the original string duration

Attributes

frozen_value[R]

Public Class Methods

new(input, base=nil) click to toggle source
Calls superclass method
# File lib/rtasklib/models.rb, line 21
def initialize input, base=nil
  @frozen_value = input.dup.freeze
  parsed = %xtask calc #{input}`.chomp

  super parsed, base
end