Class: Sorare::Rewards::Player::Supply
- Inherits:
-
Struct
- Object
- Struct
- Sorare::Rewards::Player::Supply
- Defined in:
- lib/sorare/rewards/player.rb
Instance Attribute Summary collapse
-
#cooldowned ⇒ Object
Returns the value of attribute cooldowned.
-
#limited ⇒ Object
Returns the value of attribute limited.
-
#overall ⇒ Object
Returns the value of attribute overall.
-
#projected ⇒ Object
Returns the value of attribute projected.
Instance Method Summary collapse
- #available ⇒ Object
-
#initialize(overall: 0, projected: 0, cooldowned: 0, limited: 0) ⇒ Supply
constructor
A new instance of Supply.
- #pool_contribution ⇒ Object
Constructor Details
#initialize(overall: 0, projected: 0, cooldowned: 0, limited: 0) ⇒ Supply
Returns a new instance of Supply.
13 14 15 |
# File 'lib/sorare/rewards/player.rb', line 13 def initialize(overall: 0, projected: 0, cooldowned: 0, limited: 0) super(overall: overall, projected: projected, cooldowned: cooldowned, limited: limited) end |
Instance Attribute Details
#cooldowned ⇒ Object
Returns the value of attribute cooldowned
12 13 14 |
# File 'lib/sorare/rewards/player.rb', line 12 def cooldowned @cooldowned end |
#limited ⇒ Object
Returns the value of attribute limited
12 13 14 |
# File 'lib/sorare/rewards/player.rb', line 12 def limited @limited end |
#overall ⇒ Object
Returns the value of attribute overall
12 13 14 |
# File 'lib/sorare/rewards/player.rb', line 12 def overall @overall end |
#projected ⇒ Object
Returns the value of attribute projected
12 13 14 |
# File 'lib/sorare/rewards/player.rb', line 12 def projected @projected end |
Instance Method Details
#available ⇒ Object
21 22 23 |
# File 'lib/sorare/rewards/player.rb', line 21 def available [overall, cooldowned, limited].min || 0 end |
#pool_contribution ⇒ Object
17 18 19 |
# File 'lib/sorare/rewards/player.rb', line 17 def pool_contribution [projected, available].min || 0 end |