Class: Cadenya::Types::Tool
- Inherits:
-
Object
- Object
- Cadenya::Types::Tool
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, spec: nil, info: nil, state: nil) ⇒ Tool
constructor
A new instance of Tool.
- #to_h ⇒ Object
Constructor Details
#initialize(metadata: nil, spec: nil, info: nil, state: nil) ⇒ Tool
Returns a new instance of Tool.
5607 5608 5609 5610 5611 5612 |
# File 'lib/cadenya/types.rb', line 5607 def initialize(metadata: nil, spec: nil, info: nil, state: nil) @metadata = @spec = spec @info = info @state = state end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
5605 5606 5607 |
# File 'lib/cadenya/types.rb', line 5605 def info @info end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
5605 5606 5607 |
# File 'lib/cadenya/types.rb', line 5605 def @metadata end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
5605 5606 5607 |
# File 'lib/cadenya/types.rb', line 5605 def spec @spec end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
5605 5606 5607 |
# File 'lib/cadenya/types.rb', line 5605 def state @state end |
Class Method Details
.from_json(data) ⇒ Object
5614 5615 5616 5617 5618 5619 5620 5621 |
# File 'lib/cadenya/types.rb', line 5614 def self.from_json(data) new( metadata: data["metadata"].nil? ? nil : Types::ResourceMetadata.from_json(data["metadata"]), spec: data["spec"].nil? ? nil : Types::ToolSpec.from_json(data["spec"]), info: data["info"].nil? ? nil : Types::ToolInfo.from_json(data["info"]), state: data["state"], ) end |