We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom methods for map_content are called on a separate model
map_content
class TestModel attr_accessor :value end class Test < Lutaml::Model::Serializable model TestModel attribute :value, :string xml do root 'test' map_content to: :value, with: { to: :value_to_xml, from: :value_from_xml } end def value_to_xml(model, parent, doc) el = doc.create_element('cont') doc.add_text(el, model.value) doc.add_element(parent, el) end def value_from_xml(model, value) model.value = value end end > test = TestModel.new > test.value='Val' > Test.to_xml(test) .../gems/ruby-3.3.3/gems/lutaml-model-0.3.30/lib/lutaml/model/xml_adapter/xml_document.rb:244:in `process_content_mapping': undefined method `value_to_xml' for an instance of TestModel (NoMethodError)
We had a similar problem with the map_element method #83
map_element
The text was updated successfully, but these errors were encountered:
HassanAkbar
No branches or pull requests
Custom methods for
map_content
are called on a separate modelWe had a similar problem with the
map_element
method #83The text was updated successfully, but these errors were encountered: