Class: CQM::PopulationMap

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document
Defined in:
app/models/cqm/population_set.rb

Overview

Base class for the population maps

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.transform_json(json_hash, target = PopulationMap.new) ⇒ Object



141
142
143
144
145
146
147
148
# File 'app/models/cqm/population_set.rb', line 141

def self.transform_json(json_hash, target = PopulationMap.new)
  if 'PopulationMap' != json_hash['resource_type']
    return Object.const_get('CQM::' + json_hash['resource_type']).transform_json(json_hash)
  end
  result = target
  result['resource_type'] = 'PopulationMap'
  result
end

Instance Method Details

#as_json(*args) ⇒ Object



135
136
137
138
139
# File 'app/models/cqm/population_set.rb', line 135

def as_json(*args)
  result = Hash.new
  result['resource_type'] = 'PopulationMap'
  result
end