Class: Superfeature::Limit::Soft
Direct Known Subclasses
Instance Attribute Summary collapse
-
#hard_limit ⇒ Object
Returns the value of attribute hard_limit.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#soft_limit ⇒ Object
Returns the value of attribute soft_limit.
Instance Method Summary collapse
-
#initialize(quantity:, soft_limit:, hard_limit:) ⇒ Soft
constructor
A new instance of Soft.
- #maximum ⇒ Object
Methods inherited from Hard
#enabled?, #exceeded?, #remaining
Methods inherited from Base
Constructor Details
#initialize(quantity:, soft_limit:, hard_limit:) ⇒ Soft
Returns a new instance of Soft.
56 57 58 59 60 |
# File 'lib/superfeature.rb', line 56 def initialize(quantity:, soft_limit:, hard_limit:) @quantity = quantity @soft_limit = soft_limit @hard_limit = hard_limit end |
Instance Attribute Details
#hard_limit ⇒ Object
Returns the value of attribute hard_limit.
54 55 56 |
# File 'lib/superfeature.rb', line 54 def hard_limit @hard_limit end |
#quantity ⇒ Object
Returns the value of attribute quantity.
54 55 56 |
# File 'lib/superfeature.rb', line 54 def quantity @quantity end |
#soft_limit ⇒ Object
Returns the value of attribute soft_limit.
54 55 56 |
# File 'lib/superfeature.rb', line 54 def soft_limit @soft_limit end |
Instance Method Details
#maximum ⇒ Object
62 63 64 |
# File 'lib/superfeature.rb', line 62 def maximum @soft_limit end |