Sha256: a64d5de8ccd235ad146add1748b2b55092e6ce55cf841824a87c0ced2239e415
Contents?: true
Size: 625 Bytes
Versions: 2
Compression:
Stored size: 625 Bytes
Contents
require 'governor/plugin' require 'governor/plugin_manager' require 'governor/article' require 'governor/formatters' require 'governor/mapping' require 'governor/controllers/helpers' require 'rails' require 'governor/rails' module Governor mattr_accessor :resources @@resources = {} def self.map(resource, options = {}) self.resources[resource] = Governor::Mapping.new(resource, options) end def self.setup yield self end def self.authorize_if(&blk) @@authz_rules = blk end def self.authorized?(actor, action, article=nil) @@authz_rules.call(actor, action, article) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
governor-0.1.1 | lib/governor.rb |
governor-0.1.0 | lib/governor.rb |