Class: Portage::Ucp::Rating
- Inherits:
-
Data
- Object
- Data
- Portage::Ucp::Rating
- Defined in:
- lib/portage/ucp/value_objects.rb
Overview
schemas/shopping/types/rating.json
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#scale_max ⇒ Object
readonly
Returns the value of attribute scale_max.
-
#scale_min ⇒ Object
readonly
Returns the value of attribute scale_min.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value:, scale_max:, scale_min: 1, count: nil) ⇒ Rating
constructor
A new instance of Rating.
- #to_wire_h ⇒ Object
Constructor Details
#initialize(value:, scale_max:, scale_min: 1, count: nil) ⇒ Rating
Returns a new instance of Rating.
72 |
# File 'lib/portage/ucp/value_objects.rb', line 72 def initialize(value:, scale_max:, scale_min: 1, count: nil) = super |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count
71 72 73 |
# File 'lib/portage/ucp/value_objects.rb', line 71 def count @count end |
#scale_max ⇒ Object (readonly)
Returns the value of attribute scale_max
71 72 73 |
# File 'lib/portage/ucp/value_objects.rb', line 71 def scale_max @scale_max end |
#scale_min ⇒ Object (readonly)
Returns the value of attribute scale_min
71 72 73 |
# File 'lib/portage/ucp/value_objects.rb', line 71 def scale_min @scale_min end |
#value ⇒ Object (readonly)
Returns the value of attribute value
71 72 73 |
# File 'lib/portage/ucp/value_objects.rb', line 71 def value @value end |
Instance Method Details
#to_wire_h ⇒ Object
74 75 76 |
# File 'lib/portage/ucp/value_objects.rb', line 74 def to_wire_h { "value" => value, "scale_min" => scale_min, "scale_max" => scale_max, "count" => count }.compact end |