Class: Portage::Ucp::SelectedOption
- Inherits:
-
Data
- Object
- Data
- Portage::Ucp::SelectedOption
- Defined in:
- lib/portage/ucp/value_objects.rb
Overview
schemas/shopping/types/selected_option.json — which OptionValue a Variant actually carries for a given option (e.g. Size: Large).
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, label:, id: nil) ⇒ SelectedOption
constructor
A new instance of SelectedOption.
- #to_wire_h ⇒ Object
Constructor Details
#initialize(name:, label:, id: nil) ⇒ SelectedOption
Returns a new instance of SelectedOption.
65 |
# File 'lib/portage/ucp/value_objects.rb', line 65 def initialize(name:, label:, id: nil) = super |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id
64 65 66 |
# File 'lib/portage/ucp/value_objects.rb', line 64 def id @id end |
#label ⇒ Object (readonly)
Returns the value of attribute label
64 65 66 |
# File 'lib/portage/ucp/value_objects.rb', line 64 def label @label end |
#name ⇒ Object (readonly)
Returns the value of attribute name
64 65 66 |
# File 'lib/portage/ucp/value_objects.rb', line 64 def name @name end |
Instance Method Details
#to_wire_h ⇒ Object
67 |
# File 'lib/portage/ucp/value_objects.rb', line 67 def to_wire_h = { "name" => name, "id" => id, "label" => label }.compact |