Module: FHIR::ClassMethods
Instance Method Summary collapse
Instance Method Details
#from_contents(contents) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/fhir_models/fhir.rb', line 7 def from_contents(contents) doc = Nokogiri::XML(contents) if doc.errors.empty? versioned_fhir_module::Xml.from_xml(contents) else versioned_fhir_module::Json.from_json(contents) end end |