Class: CreateAPIVersionNonGitLinkedSchemasItem
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- CreateAPIVersionNonGitLinkedSchemasItem
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
35924 35925 35926 35927 35928 35929 |
# File 'lib/schemas.rb', line 35924 def self.from_dynamic!(d) d = Types::Hash[d] new( id: d["id"], ) end |
.from_json!(json) ⇒ Object
35931 35932 35933 |
# File 'lib/schemas.rb', line 35931 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
35935 35936 35937 35938 35939 |
# File 'lib/schemas.rb', line 35935 def to_dynamic { "id" => id, } end |
#to_json(options = nil) ⇒ Object
35941 35942 35943 |
# File 'lib/schemas.rb', line 35941 def to_json( = nil) JSON.generate(to_dynamic, ) end |