Class: Cadenya::Types::VariationAssignment_Tool
- Inherits:
-
Object
- Object
- Cadenya::Types::VariationAssignment_Tool
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#tool ⇒ Object
readonly
Returns the value of attribute tool.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type: nil, tool: nil, id: nil) ⇒ VariationAssignment_Tool
constructor
A new instance of VariationAssignment_Tool.
- #to_h ⇒ Object
Constructor Details
#initialize(type: nil, tool: nil, id: nil) ⇒ VariationAssignment_Tool
Returns a new instance of VariationAssignment_Tool.
7731 7732 7733 7734 7735 |
# File 'lib/cadenya/types.rb', line 7731 def initialize(type: nil, tool: nil, id: nil) @type = type @tool = tool @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
7729 7730 7731 |
# File 'lib/cadenya/types.rb', line 7729 def id @id end |
#tool ⇒ Object (readonly)
Returns the value of attribute tool.
7729 7730 7731 |
# File 'lib/cadenya/types.rb', line 7729 def tool @tool end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7729 7730 7731 |
# File 'lib/cadenya/types.rb', line 7729 def type @type end |
Class Method Details
.from_json(data) ⇒ Object
7737 7738 7739 7740 7741 7742 7743 |
# File 'lib/cadenya/types.rb', line 7737 def self.from_json(data) new( type: data["type"], tool: data["tool"].nil? ? nil : Types::BareMetadata.from_json(data["tool"]), id: data["id"], ) end |