Sha256: fa8eda281d2a999bb7facc8951d16f418c505e03fb646882b0d25f2c3ba463ce
Contents?: true
Size: 306 Bytes
Versions: 2
Compression:
Stored size: 306 Bytes
Contents
module Ostiary class PolicyLimited < Policy def inspect "#{name} only for #{actions.to_sentence}" end def met?(action, &block) return true unless actions.include?(action) super end def error_message(action) "#{action} limited by #{name}" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ostiary-0.16.0 | lib/ostiary/policy_limited.rb |
ostiary-0.15.0 | lib/ostiary/policy_limited.rb |