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
1101 1102 1103 1104 1105 1106 |
# File 'lib/ddb_ruby/fifth_edition/structs.rb', line 1101 def self.from_dynamic!(d) d = Types::Hash[d] new( feat_1212493: d["feat:1212493"], ) end |
.from_json!(json) ⇒ Object
1108 1109 1110 |
# File 'lib/ddb_ruby/fifth_edition/structs.rb', line 1108 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
1112 1113 1114 1115 1116 |
# File 'lib/ddb_ruby/fifth_edition/structs.rb', line 1112 def to_dynamic { "feat:1212493" => feat_1212493, } end |
#to_json(options = nil) ⇒ Object
1118 1119 1120 |
# File 'lib/ddb_ruby/fifth_edition/structs.rb', line 1118 def to_json( = nil) JSON.generate(to_dynamic, ) end |