Sha256: 805176d91444840308575ef9479409ff5f4c8e5a99ce2b1f02fd09a67dcc82bc
Contents?: true
Size: 314 Bytes
Versions: 4
Compression:
Stored size: 314 Bytes
Contents
# frozen_string_literal: true class ApplicationPolicy attr_accessor :user, :resource, :action def self.miau(actions, meth = nil, &block) kls = name.underscore[0..-8] # remove "_policy" [actions].flatten.each { |action| Miau::PolicyStorage.instance.add_policy(kls, action, meth) } end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
miau-1.1.10 | lib/miau/application_policy.rb |
miau-1.1.8 | lib/miau/application_policy.rb |
miau-1.1.7 | lib/miau/application_policy.rb |
miau-1.1.6 | lib/miau/application_policy.rb |