Class: Lutaml::Store::Format::Yaml
- Defined in:
- lib/lutaml/store/format/yaml.rb
Instance Method Summary collapse
- #deserialize(data, model_class) ⇒ Object
- #deserialize_many(data, model_class) ⇒ Object
- #extension ⇒ Object
- #glob_pattern ⇒ Object
- #serialize(model) ⇒ Object
Methods inherited from Base
Instance Method Details
#deserialize(data, model_class) ⇒ Object
19 20 21 |
# File 'lib/lutaml/store/format/yaml.rb', line 19 def deserialize(data, model_class) model_class.from_yaml(data) end |
#deserialize_many(data, model_class) ⇒ Object
23 24 25 |
# File 'lib/lutaml/store/format/yaml.rb', line 23 def deserialize_many(data, model_class) model_class.from_yamls(data) end |
#extension ⇒ Object
7 8 9 |
# File 'lib/lutaml/store/format/yaml.rb', line 7 def extension ".yaml" end |
#glob_pattern ⇒ Object
11 12 13 |
# File 'lib/lutaml/store/format/yaml.rb', line 11 def glob_pattern "*.{yaml,yml}" end |
#serialize(model) ⇒ Object
15 16 17 |
# File 'lib/lutaml/store/format/yaml.rb', line 15 def serialize(model) model.to_yaml end |