Class: RolloutPercentage
- Inherits:
-
Object
- Object
- RolloutPercentage
- Defined in:
- lib/rollout_percentage.rb
Constant Summary collapse
- VERSION =
'0.1.2'.freeze
Instance Method Summary collapse
-
#initialize(feature_flag:, rollout_client:) ⇒ RolloutPercentage
constructor
A new instance of RolloutPercentage.
- #perform ⇒ Object
Constructor Details
#initialize(feature_flag:, rollout_client:) ⇒ RolloutPercentage
4 5 6 7 |
# File 'lib/rollout_percentage.rb', line 4 def initialize(feature_flag:, rollout_client:) self.feature_flag = feature_flag self.rollout_client = rollout_client end |
Instance Method Details
#perform ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/rollout_percentage.rb', line 9 def perform if enabled? block_given? ? yield : true else false end end |