class Rtasklib::Models::VirtusDuration

Custom coercer that changes a string input into an TWDuration object If nil? or blank? it returns nil

Modifies the coerce method.

Public Instance Methods

coerce(v) click to toggle source

@param [Object] any value that we are trying to coerce, probably String @return [TWDuration, nil]

# File lib/rtasklib/models.rb, line 36
def coerce(v)
  if v.nil? || v.blank? then nil else TWDuration.new(v) end
end