Sha256: 5ffba35e9cf509c5557c3451fb39b65e664ed690a0cf1004017122d71b434ebf

Contents?: true

Size: 479 Bytes

Versions: 1

Compression:

Stored size: 479 Bytes

Contents

require 'abilities/action_controller/base'
require 'abilities/action_view/base'
require 'abilities/proxy'
require 'abilities/definitions'
require 'abilities/exceptions'
require 'abilities/concern'
require 'abilities/railtie'

module Abilities
  class << self

    def define(&block)
      @block = block
    end

    def can?(actor, action, subject)
      Definitions.new(actor, &@block).can?(action, subject)
    end

    def cannot?(*args)
      !can?(*args)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
abilities-0.1.1 lib/abilities.rb