Sha256: 5d550129a63eab7892c62eb713114c3d08d7677dcdfa0d21e8c359907080d0a5
Contents?: true
Size: 243 Bytes
Versions: 2
Compression:
Stored size: 243 Bytes
Contents
module AccessPolicyRails require 'delegate' class PolicyWrapper < SimpleDelegator def allow?(permission) permission = permission.to_s.end_with?('?') ? permission : "#{permission}?" self.send(permission) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
access_policy_rails-0.0.2 | lib/access_policy_rails/policy_wrapper.rb |
access_policy_rails-0.0.1 | lib/access_policy_rails/policy_wrapper.rb |