Sha256: 509dc5be312447077dc28bec62bd3fd2f9ad8a68495cd6f9ed7c5bd8600afe7f

Contents?: true

Size: 596 Bytes

Versions: 2

Compression:

Stored size: 596 Bytes

Contents

# frozen_string_literal: true

require_relative 'error_message_formatter'

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

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

          private

          attr_reader :matcher, :expected_kind, :actual_kind
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pundit-matchers-1.8.4 lib/pundit/matchers/utils/all_actions/permitted_actions_error_formatter.rb
pundit-matchers-1.8.3 lib/pundit/matchers/utils/all_actions/permitted_actions_error_formatter.rb