Sha256: e6bd12cf77af1ba2ac9230754605440661548e36f7bd05c656919e8331942c8c

Contents?: true

Size: 492 Bytes

Versions: 6

Compression:

Stored size: 492 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

6 entries across 6 versions & 1 rubygems

Version Path
health-data-standards-3.7.0 lib/health-data-standards/models/facility.rb
health-data-standards-3.6.1 lib/health-data-standards/models/facility.rb
health-data-standards-3.5.3 lib/health-data-standards/models/facility.rb
health-data-standards-3.5.2 lib/health-data-standards/models/facility.rb
health-data-standards-3.5.1 lib/health-data-standards/models/facility.rb
health-data-standards-3.5.0 lib/health-data-standards/models/facility.rb