Sha256: 562598d7c43422d9a64cd970840daddbe77bf3eaa60cddca5b27f22b09db9985

Contents?: true

Size: 393 Bytes

Versions: 8

Compression:

Stored size: 393 Bytes

Contents

module CanTango
  class PermitEngine < Engine
    module Executor
      class Base < Abstract
        # execute the permit
        def execute!
          valid_for?(subject) ? permit? : not_candidate_permit
        end

        protected

        def not_candidate_permit
          puts "Permit #{permit} is not valid for #{subject}" if CanTango.debug?
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cantango-0.8.9.5 lib/cantango/permit_engine/executor/base.rb
cantango-0.8.9.4 lib/cantango/permit_engine/executor/base.rb
cantango-0.8.9.3 lib/cantango/permit_engine/executor/base.rb
cantango-0.8.9.2 lib/cantango/permit_engine/executor/base.rb
cantango-0.8.9.1 lib/cantango/permit_engine/executor/base.rb
cantango-0.8.9 lib/cantango/permit_engine/executor/base.rb
cantango-0.8.8.1 lib/cantango/permit_engine/executor/base.rb
cantango-0.8.8 lib/cantango/permit_engine/executor/base.rb