Sha256: de1836d39c36ebd6652bad5638b4000bd075eb6634afbd67d6d7cd95e63c7208
Contents?: true
Size: 299 Bytes
Versions: 2
Compression:
Stored size: 299 Bytes
Contents
module Ostiary class PolicyExempted < Policy def inspect "#{name} except for #{rules.to_sentence}" end def met?(action) return true if rules.include?(action) yield end def error_message(action) "#{action} not exempted for #{name}" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ostiary-0.9.0 | lib/ostiary/policy_exempted.rb |
ostiary-0.8.0 | lib/ostiary/policy_exempted.rb |