Sha256: 25d3d262799c208a9b017e1698428dd288a48d1dc3381b502c94aca9ff87a0cd

Contents?: true

Size: 623 Bytes

Versions: 5

Compression:

Stored size: 623 Bytes

Contents

module CanTango
  class PermitEngine < Engine
    module Executor
      class Abstract
        attr_accessor :permit

        def initialize permit
          @permit = permit
        end

        def permit?
          permit.permit? if permit
        end

        def execute!
          raise "Must be implemented by subclass"
        end

        protected

        def options
          permit.options
        end

        def subject
          permit.subject
        end

        def user
          permit.user
        end

        def user_account
          permit.user_account
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cantango-0.8.7 lib/cantango/permit_engine/executor/abstract.rb
cantango-0.8.6.2 lib/cantango/permit_engine/executor/abstract.rb
cantango-0.8.6.1 lib/cantango/permit_engine/executor/abstract.rb
cantango-0.8.6 lib/cantango/permit_engine/executor/abstract.rb
cantango-0.8.5.1 lib/cantango/permit_engine/executor/abstract.rb