Skip to content

Commit

Permalink
fix: calling attributes on nil
Browse files Browse the repository at this point in the history
  • Loading branch information
HassanAkbar authored and ronaldtse committed Oct 21, 2024
1 parent b4d7455 commit aa7e4a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/metaschema/code_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
module Metaschema
class CodeType < Lutaml::Model::Serializable
attribute :content, :string
attribute :class, :string
attribute :klass, :string
attribute :a, AnchorType, collection: true
attribute :insert, InsertType, collection: true
attribute :br, :string, collection: true
Expand All @@ -27,7 +27,7 @@ class CodeType < Lutaml::Model::Serializable
namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"

map_content to: :content
map_attribute "class", to: :class
map_attribute "class", to: :klass
map_element "a", to: :a
map_element "insert", to: :insert
map_element "br", to: :br
Expand Down
4 changes: 2 additions & 2 deletions lib/metaschema/remarks_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module Metaschema
class RemarksType < Lutaml::Model::Serializable
attribute :class, :string
attribute :klass, :string
attribute :h1, InlineMarkupType, collection: true
attribute :h2, InlineMarkupType, collection: true
attribute :h3, InlineMarkupType, collection: true
Expand All @@ -30,7 +30,7 @@ class RemarksType < Lutaml::Model::Serializable
root "RemarksType"
namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"

map_attribute "class", to: :class
map_attribute "class", to: :klass
map_element "h1", to: :h1
map_element "h2", to: :h2
map_element "h3", to: :h3
Expand Down

0 comments on commit aa7e4a3

Please sign in to comment.