Class: Superfeature::Limit::Unlimited

Inherits:
Soft show all
Defined in:
lib/superfeature.rb

Overview

Unlimited is treated like a Soft, initialized with infinity values. It is recommended to set a ‘soft_limit` value based on the technical limitations of your application unless you’re running a theoritcal Turing Machine.

See en.wikipedia.org/wiki/Turing_machine for details.

Constant Summary collapse

INFINITY =
Float::INFINITY

Instance Attribute Summary

Attributes inherited from Soft

#hard_limit, #quantity, #soft_limit

Attributes inherited from Hard

#maximum, #quantity

Instance Method Summary collapse

Methods inherited from Soft

#maximum

Methods inherited from Hard

#enabled?, #exceeded?, #remaining

Methods inherited from Base

#disabled?, #enabled?

Constructor Details

#initialize(quantity: nil, hard_limit: INFINITY, soft_limit: INFINITY) ⇒ Unlimited

Returns a new instance of Unlimited.



75
76
77
# File 'lib/superfeature.rb', line 75

def initialize(quantity: nil, hard_limit: INFINITY, soft_limit: INFINITY, **)
  super(quantity:, hard_limit:, soft_limit:, **)
end