Sha256: 685c4c151870c252efb7032b82e4fefddf354aa5350ecfb1827d40177f0b823e

Contents?: true

Size: 303 Bytes

Versions: 2

Compression:

Stored size: 303 Bytes

Contents

module Ostiary
  class PolicyExempted < Policy

    def inspect
      "#{name} except for #{actions.to_sentence}"
    end

    def met?(action)
      return true if actions.include?(action)
      super
    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.11.0 lib/ostiary/policy_exempted.rb
ostiary-0.10.0 lib/ostiary/policy_exempted.rb