Class: Trebuchet::Strategy::LogicAnd
- Defined in:
- lib/trebuchet/strategy/logic_and.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_and.rb', line 5 def launch_at?(user, request = nil) @strategies .all? { |s| (!s.needs_user? || !user.nil?) && s.launch_at?(user, request) } end |