Sha256: bfddc86ff4b0db5a9037640a89836bafb3af4c01c1828222cb821ef94449e463

Contents?: true

Size: 598 Bytes

Versions: 7

Compression:

Stored size: 598 Bytes

Contents

# frozen_string_literal: true

require_relative 'error_message_formatter'

module Pundit
  module Matchers
    module Utils
      module AllActions
        # Error message formatter for `forbid_all_actions` matcher.
        class ForbiddenActionsErrorFormatter
          include AllActions::ErrorMessageFormatter

          def initialize(matcher)
            @expected_kind = 'forbidden'
            @opposite_kind = 'permitted'
            @matcher = matcher
          end

          private

          attr_reader :matcher, :expected_kind, :opposite_kind
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pundit-matchers-2.3.0 lib/pundit/matchers/utils/all_actions/forbidden_actions_error_formatter.rb
pundit-matchers-2.2.0 lib/pundit/matchers/utils/all_actions/forbidden_actions_error_formatter.rb
pundit-matchers-2.1.0 lib/pundit/matchers/utils/all_actions/forbidden_actions_error_formatter.rb
pundit-matchers-2.0.0 lib/pundit/matchers/utils/all_actions/forbidden_actions_error_formatter.rb
pundit-matchers-1.9.0 lib/pundit/matchers/utils/all_actions/forbidden_actions_error_formatter.rb
pundit-matchers-1.8.4 lib/pundit/matchers/utils/all_actions/forbidden_actions_error_formatter.rb
pundit-matchers-1.8.3 lib/pundit/matchers/utils/all_actions/forbidden_actions_error_formatter.rb