Class: Oscal::MetadataBlockWrapper

Inherits:
MetadataBlock show all
Includes:
ParsingFunctions
Defined in:
lib/oscal/assembly.rb

Constant Summary

Constants inherited from MetadataBlock

Oscal::MetadataBlock::KEY

Constants inherited from BaseClass

BaseClass::KEY

Instance Method Summary collapse

Methods included from ParsingFunctions

#str2sym, #sym2str

Methods inherited from MetadataBlock

#set_value

Methods inherited from BaseClass

#set_value, wrap

Methods included from Serializer

included, #to_h, #to_json, #to_xml, #to_yaml

Constructor Details

#initialize(metadata_hash) ⇒ MetadataBlockWrapper

Returns a new instance of MetadataBlockWrapper.



8
9
10
11
12
# File 'lib/oscal/assembly.rb', line 8

def initialize()
  # MetadataBlock likes to get strings, but may sometimes get symbols
  # this little function makes sure it gets strings everytime
  super(.transform_keys { |key| sym2str(key) })
end