Class: Moov::Models::Components::ProductOption
- Inherits:
-
Object
- Object
- Moov::Models::Components::ProductOption
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/moov/models/components/productoption.rb
Overview
Represents a single product option within a group.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name:, description: nil, price_modifier: nil, images: nil) ⇒ ProductOption
constructor
A new instance of ProductOption.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(name:, description: nil, price_modifier: nil, images: nil) ⇒ ProductOption
Returns a new instance of ProductOption.
29 30 31 32 33 34 |
# File 'lib/moov/models/components/productoption.rb', line 29 def initialize(name:, description: nil, price_modifier: nil, images: nil) @name = name @description = description @price_modifier = price_modifier @images = images end |
Instance Method Details
#==(other) ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/moov/models/components/productoption.rb', line 37 def ==(other) return false unless other.is_a? self.class return false unless @name == other.name return false unless @description == other.description return false unless @price_modifier == other.price_modifier return false unless @images == other.images true end |