Sha256: d3f1587c52bd1f4935734b2e372478489601a06cc69f03dd9f6638633f587cf1
Contents?: true
Size: 453 Bytes
Versions: 20
Compression:
Stored size: 453 Bytes
Contents
class Facility include Mongoid::Document field :name, type: String field :code, type: Hash field :start_time, type: Integer field :end_time, type: Integer embeds_many :addresses, as: :locatable embeds_many :telecoms, as: :contactable def shift_dates(date_diff) self.start_time = (self.start_time.nil?) ? nil : self.start_time + date_diff self.end_time = (self.end_time.nil?) ? nil : self.end_time + date_diff end end
Version data entries
20 entries across 20 versions & 1 rubygems