Class: DdbRuby::FifthEdition::DefinitionKeyNameMap
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- DdbRuby::FifthEdition::DefinitionKeyNameMap
- Defined in:
- lib/ddb_ruby/fifth_edition/structs.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
1000 1001 1002 1003 1004 1005 |
# File 'lib/ddb_ruby/fifth_edition/structs.rb', line 1000 def self.from_dynamic!(d) d = Types::Hash[d] new( feat_1212493: d["feat:1212493"], ) end |
.from_json!(json) ⇒ Object
1007 1008 1009 |
# File 'lib/ddb_ruby/fifth_edition/structs.rb', line 1007 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
1011 1012 1013 1014 1015 |
# File 'lib/ddb_ruby/fifth_edition/structs.rb', line 1011 def to_dynamic { "feat:1212493" => feat_1212493, } end |
#to_json(options = nil) ⇒ Object
1017 1018 1019 |
# File 'lib/ddb_ruby/fifth_edition/structs.rb', line 1017 def to_json( = nil) JSON.generate(to_dynamic, ) end |