Class: Ebisu::StoreRatings
- Inherits:
-
Object
- Object
- Ebisu::StoreRatings
- Defined in:
- lib/ebisu/models/store_ratings.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#rate ⇒ Object
Returns the value of attribute rate.
Instance Method Summary collapse
-
#initialize(data) ⇒ StoreRatings
constructor
A new instance of StoreRatings.
Constructor Details
#initialize(data) ⇒ StoreRatings
Returns a new instance of StoreRatings.
12 13 14 15 |
# File 'lib/ebisu/models/store_ratings.rb', line 12 def initialize(data) @rate = data.dig('rate').to_f @count = data.dig('reviewCount').to_i end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
11 12 13 |
# File 'lib/ebisu/models/store_ratings.rb', line 11 def count @count end |
#rate ⇒ Object
Returns the value of attribute rate.
7 8 9 |
# File 'lib/ebisu/models/store_ratings.rb', line 7 def rate @rate end |