Class: OpenEHR::RM::CompositionFactory

Inherits:
Factory
  • Object
show all
Defined in:
lib/openehr/rm/factory.rb

Class Method Summary collapse

Methods inherited from Factory

#build, create, #initialize, params

Constructor Details

This class inherits a constructor from OpenEHR::RM::Factory

Class Method Details

.create_from_json(json) ⇒ Object



301
302
303
304
# File 'lib/openehr/rm/factory.rb', line 301

def create_from_json(json)
  hash = JSON.parse(json, max_nesting: false, symbolize_names: true)
  OpenEHR::RM::Composition::Composition.new(params(hash))
end