Sha256: 22b50efc841a9e183351efae6606895cc898afb5aeaba56331b99570c6dea009

Contents?: true

Size: 448 Bytes

Versions: 6

Compression:

Stored size: 448 Bytes

Contents

require 'effective_developer/engine'
require 'effective_developer/version'

module EffectiveDeveloper

  def self.setup
    yield self
  end

  def self.authorized?(controller, action, resource)
    if authorization_method.respond_to?(:call) || authorization_method.kind_of?(Symbol)
      raise Effective::AccessDenied.new() unless (controller || self).instance_exec(controller, action, resource, &authorization_method)
    end
    true
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
effective_developer-0.0.7 lib/effective_developer.rb
effective_developer-0.0.6 lib/effective_developer.rb
effective_developer-0.0.5 lib/effective_developer.rb
effective_developer-0.0.4 lib/effective_developer.rb
effective_developer-0.0.3 lib/effective_developer.rb
effective_developer-0.0.2 lib/effective_developer.rb