Class: PostCollectionsForkCollectionIDBody
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostCollectionsForkCollectionIDBody
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
21704 21705 21706 21707 21708 21709 |
# File 'lib/schemas.rb', line 21704 def self.from_dynamic!(d) d = Types::Hash[d] new( label: d.fetch("label"), ) end |
.from_json!(json) ⇒ Object
21711 21712 21713 |
# File 'lib/schemas.rb', line 21711 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
21715 21716 21717 21718 21719 |
# File 'lib/schemas.rb', line 21715 def to_dynamic { "label" => label, } end |
#to_json(options = nil) ⇒ Object
21721 21722 21723 |
# File 'lib/schemas.rb', line 21721 def to_json( = nil) JSON.generate(to_dynamic, ) end |