Class: APIDetailsSchemasItem
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- APIDetailsSchemasItem
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
35695 35696 35697 35698 35699 35700 |
# File 'lib/schemas.rb', line 35695 def self.from_dynamic!(d) d = Types::Hash[d] new( id: d["id"], ) end |
.from_json!(json) ⇒ Object
35702 35703 35704 |
# File 'lib/schemas.rb', line 35702 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
35706 35707 35708 35709 35710 |
# File 'lib/schemas.rb', line 35706 def to_dynamic { "id" => id, } end |
#to_json(options = nil) ⇒ Object
35712 35713 35714 |
# File 'lib/schemas.rb', line 35712 def to_json( = nil) JSON.generate(to_dynamic, ) end |