Class: Retailer::SiblingPriceRefresher::Result
- Inherits:
-
Data
- Object
- Data
- Retailer::SiblingPriceRefresher::Result
- Defined in:
- app/services/retailer/sibling_price_refresher.rb
Overview
Service object: result.
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#lowest_price ⇒ Object
readonly
Returns the value of attribute lowest_price.
-
#prices ⇒ Object
readonly
Returns the value of attribute prices.
-
#refreshed_count ⇒ Object
readonly
Returns the value of attribute refreshed_count.
Instance Method Summary collapse
-
#initialize(refreshed_count: nil, lowest_price: nil, prices: nil, errors: nil) ⇒ Result
constructor
A new instance of Result.
- #success? ⇒ Boolean
Constructor Details
#initialize(refreshed_count: nil, lowest_price: nil, prices: nil, errors: nil) ⇒ Result
Returns a new instance of Result.
21 |
# File 'app/services/retailer/sibling_price_refresher.rb', line 21 def initialize(refreshed_count: nil, lowest_price: nil, prices: nil, errors: nil) = super |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors
20 21 22 |
# File 'app/services/retailer/sibling_price_refresher.rb', line 20 def errors @errors end |
#lowest_price ⇒ Object (readonly)
Returns the value of attribute lowest_price
20 21 22 |
# File 'app/services/retailer/sibling_price_refresher.rb', line 20 def lowest_price @lowest_price end |
#prices ⇒ Object (readonly)
Returns the value of attribute prices
20 21 22 |
# File 'app/services/retailer/sibling_price_refresher.rb', line 20 def prices @prices end |
#refreshed_count ⇒ Object (readonly)
Returns the value of attribute refreshed_count
20 21 22 |
# File 'app/services/retailer/sibling_price_refresher.rb', line 20 def refreshed_count @refreshed_count end |
Instance Method Details
#success? ⇒ Boolean
23 24 25 |
# File 'app/services/retailer/sibling_price_refresher.rb', line 23 def success? errors.empty? end |