Sha256: e6e5badb81cb671c0bdc70df3d7df8b84871504c3e0c092ed63bfee245a30d3c
Contents?: true
Size: 493 Bytes
Versions: 15
Compression:
Stored size: 493 Bytes
Contents
class Facility include Mongoid::Document include Mongoid::Attributes::Dynamic 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
15 entries across 15 versions & 1 rubygems