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

Version Path
health-data-standards-3.4.6 lib/health-data-standards/models/facility.rb
health-data-standards-3.4.5 lib/health-data-standards/models/facility.rb
health-data-standards-3.4.4 lib/health-data-standards/models/facility.rb
health-data-standards-3.4.3 lib/health-data-standards/models/facility.rb
health-data-standards-3.4.2 lib/health-data-standards/models/facility.rb
health-data-standards-3.4.1 lib/health-data-standards/models/facility.rb
health-data-standards-3.4.0 lib/health-data-standards/models/facility.rb
health-data-standards-3.2.12 lib/health-data-standards/models/facility.rb
health-data-standards-3.3.0 lib/health-data-standards/models/facility.rb
health-data-standards-3.2.11 lib/health-data-standards/models/facility.rb
health-data-standards-3.2.10 lib/health-data-standards/models/facility.rb
health-data-standards-3.2.8 lib/health-data-standards/models/facility.rb
health-data-standards-3.2.7 lib/health-data-standards/models/facility.rb
health-data-standards-3.2.6 lib/health-data-standards/models/facility.rb
health-data-standards-3.2.5 lib/health-data-standards/models/facility.rb
health-data-standards-3.2.4 lib/health-data-standards/models/facility.rb
health-data-standards-3.2.3 lib/health-data-standards/models/facility.rb
health-data-standards-3.2.2 lib/health-data-standards/models/facility.rb
health-data-standards-3.2.1 lib/health-data-standards/models/facility.rb
health-data-standards-3.2.0 lib/health-data-standards/models/facility.rb