class Zhong::MultiAt

Attributes

ats[RW]

Public Class Methods

new(ats = []) click to toggle source
# File lib/zhong/at.rb, line 153
def initialize(ats = [])
  @ats = ats
end

Public Instance Methods

==(other) click to toggle source
# File lib/zhong/at.rb, line 157
def ==(other)
  other.class == self.class && @ats == other.ats
end
as_json() click to toggle source
# File lib/zhong/at.rb, line 169
def as_json
  ats.map(&:as_json)
end
next_at(time = Time.now) click to toggle source
# File lib/zhong/at.rb, line 161
def next_at(time = Time.now)
  ats.map { |at| at.next_at(time) }.min
end
serialize() click to toggle source
# File lib/zhong/at.rb, line 173
def serialize
  MessagePack.pack(as_json)
end
to_s() click to toggle source
# File lib/zhong/at.rb, line 165
def to_s
  ats.map(&:to_s).join(", ")
end