Sha256: 27a8c7a7ea8f9f83bec328647e5aa878596f75034faeb498864e8ddf9de3a82a
Contents?: true
Size: 357 Bytes
Versions: 9
Compression:
Stored size: 357 Bytes
Contents
require 'allowance' module Happy class Controller module Permissions def permissions(&blk) (@env['happy.permissions'] ||= Allowance::Permissions.new).tap do |p| if blk blk.arity == 0 ? p.instance_exec(&blk) : blk.call(p) end end end alias_method :can, :permissions end end end
Version data entries
9 entries across 9 versions & 1 rubygems