Class: Cadenya::Types::ObjectiveTool
- Inherits:
-
Object
- Object
- Cadenya::Types::ObjectiveTool
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#snapshot ⇒ Object
readonly
Returns the value of attribute snapshot.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, snapshot: nil) ⇒ ObjectiveTool
constructor
A new instance of ObjectiveTool.
- #to_h ⇒ Object
Constructor Details
#initialize(metadata: nil, snapshot: nil) ⇒ ObjectiveTool
Returns a new instance of ObjectiveTool.
4073 4074 4075 4076 |
# File 'lib/cadenya/types.rb', line 4073 def initialize(metadata: nil, snapshot: nil) @metadata = @snapshot = snapshot end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
4071 4072 4073 |
# File 'lib/cadenya/types.rb', line 4071 def @metadata end |
#snapshot ⇒ Object (readonly)
Returns the value of attribute snapshot.
4071 4072 4073 |
# File 'lib/cadenya/types.rb', line 4071 def snapshot @snapshot end |
Class Method Details
.from_json(data) ⇒ Object
4078 4079 4080 4081 4082 4083 |
# File 'lib/cadenya/types.rb', line 4078 def self.from_json(data) new( metadata: data["metadata"].nil? ? nil : Types::BareMetadata.from_json(data["metadata"]), snapshot: data["snapshot"].nil? ? nil : Types::Tool.from_json(data["snapshot"]), ) end |