Sha256: 95d33175bcd1c825c2acd1a6b210ab53156867e8debd4a9704c3f23c964973b2

Contents?: true

Size: 439 Bytes

Versions: 13

Compression:

Stored size: 439 Bytes

Contents

module RailsOps::AuthorizationBackend
  class Abstract
    def authorize!(_operation, *_args)
      fail NotImplementedError
    end

    def exception_class
      @exception_class ||= self.class::EXCEPTION_CLASS.constantize
    rescue NameError
      fail "Unable to constantize exception class #{self.class::EXCEPTION_CLASS.inspect} " \
           "for authorization backend #{self.class.name}. Is the library loaded?"
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rails_ops-1.5.8 lib/rails_ops/authorization_backend/abstract.rb
rails_ops-1.5.7 lib/rails_ops/authorization_backend/abstract.rb
rails_ops-1.5.6 lib/rails_ops/authorization_backend/abstract.rb
rails_ops-1.5.5 lib/rails_ops/authorization_backend/abstract.rb
rails_ops-1.5.4 lib/rails_ops/authorization_backend/abstract.rb
rails_ops-1.5.0 lib/rails_ops/authorization_backend/abstract.rb
rails_ops-1.4.8 lib/rails_ops/authorization_backend/abstract.rb
rails_ops-1.4.7 lib/rails_ops/authorization_backend/abstract.rb
rails_ops-1.4.6 lib/rails_ops/authorization_backend/abstract.rb
rails_ops-1.4.5 lib/rails_ops/authorization_backend/abstract.rb
rails_ops-1.4.4 lib/rails_ops/authorization_backend/abstract.rb
rails_ops-1.4.3 lib/rails_ops/authorization_backend/abstract.rb
rails_ops-1.4.2 lib/rails_ops/authorization_backend/abstract.rb