class Cronofy::EventTime

Attributes

time[R]
tzid[R]

Public Class Methods

coerce(value) click to toggle source
# File lib/cronofy/types.rb, line 262
def self.coerce(value)
  case value
  when String
    DateOrTime.coerce(value)
  when Hash
    time_value = value["time"]
    tzid = value["tzid"]

    date_or_time = DateOrTime.coerce(time_value)

    new(date_or_time, tzid)
  end
end
new(time, tzid) click to toggle source
# File lib/cronofy/types.rb, line 257
def initialize(time, tzid)
  @time = time
  @tzid = tzid
end

Public Instance Methods

==(other) click to toggle source
# File lib/cronofy/types.rb, line 276
def ==(other)
  case other
  when EventTime
    self.time == other.time && self.tzid == other.tzid
  else
    false
  end
end