Class: Cadenya::Types::ObjectiveTask
- Inherits:
-
Object
- Object
- Cadenya::Types::ObjectiveTask
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, data: nil) ⇒ ObjectiveTask
constructor
A new instance of ObjectiveTask.
- #to_h ⇒ Object
Constructor Details
#initialize(metadata: nil, data: nil) ⇒ ObjectiveTask
Returns a new instance of ObjectiveTask.
4001 4002 4003 4004 |
# File 'lib/cadenya/types.rb', line 4001 def initialize(metadata: nil, data: nil) @metadata = @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
3999 4000 4001 |
# File 'lib/cadenya/types.rb', line 3999 def data @data end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
3999 4000 4001 |
# File 'lib/cadenya/types.rb', line 3999 def @metadata end |
Class Method Details
.from_json(data) ⇒ Object
4006 4007 4008 4009 4010 4011 |
# File 'lib/cadenya/types.rb', line 4006 def self.from_json(data) new( metadata: data["metadata"].nil? ? nil : Types::BareMetadata.from_json(data["metadata"]), data: data["data"].nil? ? nil : Types::ObjectiveTaskData.from_json(data["data"]), ) end |