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

Version Path
health-data-standards-4.3.5 lib/health-data-standards/models/facility.rb
health-data-standards-4.3.4 lib/health-data-standards/models/facility.rb
health-data-standards-4.3.3 lib/health-data-standards/models/facility.rb
health-data-standards-4.3.2 lib/health-data-standards/models/facility.rb
health-data-standards-4.3.1 lib/health-data-standards/models/facility.rb
health-data-standards-4.3.0 lib/health-data-standards/models/facility.rb
health-data-standards-4.2.0 lib/health-data-standards/models/facility.rb
health-data-standards-4.1.0 lib/health-data-standards/models/facility.rb
health-data-standards-4.0.6 lib/health-data-standards/models/facility.rb
health-data-standards-4.0.5 lib/health-data-standards/models/facility.rb
health-data-standards-4.0.4 lib/health-data-standards/models/facility.rb
health-data-standards-4.0.3 lib/health-data-standards/models/facility.rb
health-data-standards-4.0.2 lib/health-data-standards/models/facility.rb
health-data-standards-4.0.1 lib/health-data-standards/models/facility.rb
health-data-standards-4.0.0 lib/health-data-standards/models/facility.rb