Class: GithubCommitStatus2
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GithubCommitStatus2
- Defined in:
- lib/schema.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
1335 1336 1337 1338 1339 1340 |
# File 'lib/schema.rb', line 1335 def self.from_dynamic!(d) d = Types::Hash[d] new( context: d["context"] ) end |
.from_json!(json) ⇒ Object
1342 1343 1344 |
# File 'lib/schema.rb', line 1342 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
1346 1347 1348 1349 1350 |
# File 'lib/schema.rb', line 1346 def to_dynamic { "context" => context } end |
#to_json(options = nil) ⇒ Object
1352 1353 1354 |
# File 'lib/schema.rb', line 1352 def to_json( = nil) JSON.generate(to_dynamic, ) end |