Class: Cadenya::Types::VariationAssignment_Agent
- Inherits:
-
Object
- Object
- Cadenya::Types::VariationAssignment_Agent
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#agent ⇒ Object
readonly
Returns the value of attribute agent.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type: nil, agent: nil, id: nil) ⇒ VariationAssignment_Agent
constructor
A new instance of VariationAssignment_Agent.
- #to_h ⇒ Object
Constructor Details
#initialize(type: nil, agent: nil, id: nil) ⇒ VariationAssignment_Agent
Returns a new instance of VariationAssignment_Agent.
7783 7784 7785 7786 7787 |
# File 'lib/cadenya/types.rb', line 7783 def initialize(type: nil, agent: nil, id: nil) @type = type @agent = agent @id = id end |
Instance Attribute Details
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
7781 7782 7783 |
# File 'lib/cadenya/types.rb', line 7781 def agent @agent end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7781 7782 7783 |
# File 'lib/cadenya/types.rb', line 7781 def id @id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7781 7782 7783 |
# File 'lib/cadenya/types.rb', line 7781 def type @type end |
Class Method Details
.from_json(data) ⇒ Object
7789 7790 7791 7792 7793 7794 7795 |
# File 'lib/cadenya/types.rb', line 7789 def self.from_json(data) new( type: data["type"], agent: data["agent"].nil? ? nil : Types::BareMetadata.from_json(data["agent"]), id: data["id"], ) end |