Class: Ebisu::Point
- Inherits:
-
Object
- Object
- Ebisu::Point
- Defined in:
- lib/ebisu/models/point.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#premium_amount ⇒ Object
Returns the value of attribute premium_amount.
-
#premium_times ⇒ Object
Returns the value of attribute premium_times.
-
#times ⇒ Object
Returns the value of attribute times.
Instance Method Summary collapse
-
#initialize(point) ⇒ Point
constructor
A new instance of Point.
Constructor Details
#initialize(point) ⇒ Point
Returns a new instance of Point.
16 17 18 19 20 21 |
# File 'lib/ebisu/models/point.rb', line 16 def initialize(point) @amount = point.dig('Amount').to_i @times = point.dig('Times').to_i @premium_amount = point.dig('PremiumAmount').to_i @premium_times = point.dig('PremiumTimes').to_i end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
5 6 7 |
# File 'lib/ebisu/models/point.rb', line 5 def amount @amount end |
#premium_amount ⇒ Object
Returns the value of attribute premium_amount.
11 12 13 |
# File 'lib/ebisu/models/point.rb', line 11 def premium_amount @premium_amount end |
#premium_times ⇒ Object
Returns the value of attribute premium_times.
14 15 16 |
# File 'lib/ebisu/models/point.rb', line 14 def premium_times @premium_times end |
#times ⇒ Object
Returns the value of attribute times.
8 9 10 |
# File 'lib/ebisu/models/point.rb', line 8 def times @times end |