Sha256: 56507ef3ab4fbbaf04446fceaa31569ccb863e3a6a5982eba99a0f7a0887e1a6
Contents?: true
Size: 732 Bytes
Versions: 3
Compression:
Stored size: 732 Bytes
Contents
module CanTango class Ability module Helper module Engine def execute_engines! each_engine do |engine| engine_rules = engine.new(self).execute! if engine @rules << engine_rules if !engine_rules.blank? end end def each_engine &block engines.execution_order.each do |name| yield engines.registered[name] if engines.active? name end end def opts_engines_off? options[:engines] == :off end def engines_on? CanTango.config.engines.any?(:on) && !opts_engines_off? end def engines CanTango.config.engines end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cantango-core-0.1.2 | lib/cantango/ability/helper/engine.rb |
cantango-core-0.1.1 | lib/cantango/ability/helper/engine.rb |
cantango-core-0.1.0 | lib/cantango/ability/helper/engine.rb |