Class: Trebuchet::Strategy::LogicOr
- Defined in:
- lib/trebuchet/strategy/logic_or.rb
Instance Attribute Summary
Attributes inherited from LogicBase
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from LogicBase
#feature=, #initialize, #needs_user?
Methods inherited from Base
#as_json, #export, #feature_id, #inspect, #name, #needs_user?, strategy_name
Constructor Details
This class inherits a constructor from Trebuchet::Strategy::LogicBase
Instance Method Details
#launch_at?(user, request = nil) ⇒ Boolean
5 6 7 8 |
# File 'lib/trebuchet/strategy/logic_or.rb', line 5 def launch_at?(user, request = nil) @strategies .any? { |s| (!s.needs_user? || !user.nil?) && s.launch_at?(user, request) } end |