Sha256: b21803a8df9789d50966ffb8cdcf6e1afa3d7e1cf8577047851f3b9650cd37e9

Contents?: true

Size: 231 Bytes

Versions: 6

Compression:

Stored size: 231 Bytes

Contents

module Abilities
  module Concern
    extend ActiveSupport::Concern

    %w(can? cannot?).each do |name|
      define_method name do |action, subject|
        Abilities.send name, self, action, subject
      end
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
abilities-0.1.2 lib/abilities/concern.rb
abilities-0.1.0 lib/abilities/concern.rb
abilities-0.0.4 lib/abilities/concern.rb
abilities-0.0.3 lib/abilities/concern.rb
abilities-0.0.2 lib/abilities/concern.rb
abilities-0.0.1 lib/abilities/concern.rb