Class: GitInfo
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GitInfo
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
36383 36384 36385 36386 36387 36388 36389 36390 36391 36392 |
# File 'lib/schemas.rb', line 36383 def self.from_dynamic!(d) d = Types::Hash[d] new( collection_folder: d["collectionFolder"], domain: d["domain"], organization: d["organization"], repository: d["repository"], schema_folder: d["schemaFolder"], ) end |
.from_json!(json) ⇒ Object
36394 36395 36396 |
# File 'lib/schemas.rb', line 36394 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
36398 36399 36400 36401 36402 36403 36404 36405 36406 |
# File 'lib/schemas.rb', line 36398 def to_dynamic { "collectionFolder" => collection_folder, "domain" => domain, "organization" => organization, "repository" => repository, "schemaFolder" => schema_folder, } end |
#to_json(options = nil) ⇒ Object
36408 36409 36410 |
# File 'lib/schemas.rb', line 36408 def to_json( = nil) JSON.generate(to_dynamic, ) end |