Class: Trebuchet::Strategy::Percent
- Includes:
- Percentable
- Defined in:
- lib/trebuchet/strategy/percent.rb
Instance Attribute Summary
Attributes included from PerDenominationable
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options) ⇒ Percent
constructor
A new instance of Percent.
- #launch_at?(user, request = nil) ⇒ Boolean
Methods included from Percentable
#export, #set_range_from_options, #to_s
Methods included from PerDenominationable
#export, #set_range_from_options, #to_s, #value_in_range?
Methods inherited from Base
#as_json, #export, #feature_id, #inspect, #name, #needs_user?, strategy_name
Constructor Details
#initialize(options) ⇒ Percent
Returns a new instance of Percent.
5 6 7 |
# File 'lib/trebuchet/strategy/percent.rb', line 5 def initialize() () end |
Instance Method Details
#launch_at?(user, request = nil) ⇒ Boolean
9 10 11 12 |
# File 'lib/trebuchet/strategy/percent.rb', line 9 def launch_at?(user, request = nil) return false unless user && user.id value_in_range?(user.id.to_i) end |