Sha256: c8687b9568974801c09980e86a2fdb18263a8a87ee0b6bc8983801a41ec926df

Contents?: true

Size: 482 Bytes

Versions: 1

Compression:

Stored size: 482 Bytes

Contents

module CanTango
  module Executor
    module Permit
      class Abstract
        include CanTango::Helpers::Debug

        attr_accessor :permit

        def initialize permit
          @permit = permit
        end

        def execute!
          permit.execute! if permit
        end

        protected
        
        delegate :subject, :rules, :to => :permit

        def valid_for? subject
          permit.valid_for?(subject) if permit
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cantango-permits-0.1.1 lib/cantango/executor/permit/abstract.rb