Class: Genericode::Agency

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Includes:
Json::ShortNameMixin
Defined in:
lib/genericode/agency.rb

Instance Method Summary collapse

Methods included from Json::ShortNameMixin

#short_name_from_json, #short_name_to_json

Instance Method Details

#identifier_from_json(model, value) ⇒ Object



33
34
35
# File 'lib/genericode/agency.rb', line 33

def identifier_from_json(model, value)
  model.identifier = GeneralIdentifier.of_json(Utils.array_wrap(value))
end

#identifier_to_json(model, doc) ⇒ Object



37
38
39
# File 'lib/genericode/agency.rb', line 37

def identifier_to_json(model, doc)
  doc["Identifier"] = GeneralIdentifier.as_json(Utils.one_or_all(model.identifier))
end

#long_name_from_json(model, value) ⇒ Object



25
26
27
# File 'lib/genericode/agency.rb', line 25

def long_name_from_json(model, value)
  model.long_name = LongName.of_json(Utils.array_wrap(value))
end

#long_name_to_json(model, doc) ⇒ Object



29
30
31
# File 'lib/genericode/agency.rb', line 29

def long_name_to_json(model, doc)
  doc["LongName"] = LongName.as_json(Utils.one_or_all(model.long_name))
end