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.
10 11 12 13 |
# File 'lib/ebisu/models/store_ratings.rb', line 10 def initialize(data) @rate = data.dig('Rate').to_f @count = data.dig('Count').to_i end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
9 10 11 |
# File 'lib/ebisu/models/store_ratings.rb', line 9 def count @count end |
#rate ⇒ Object
Returns the value of attribute rate.
5 6 7 |
# File 'lib/ebisu/models/store_ratings.rb', line 5 def rate @rate end |