Sha256: a0f65ff0fa6e957ca1ef535f77d711dc8aa020915195fc6cb9deaef08a30b3e9

Contents?: true

Size: 427 Bytes

Versions: 10

Compression:

Stored size: 427 Bytes

Contents

module Aruba
  module Matchers
    module Base
      # Provide #indent_multiline_message helper method.
      #
      # @api private
      module MessageIndenter
        module_function

        def indent_multiline_message(message)
          message = message.sub(/\n+\z/, "")
          message.lines.map do |line|
            /\S/.match?(line) ? "   #{line}" : line
          end.join
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/aruba-2.2.0/lib/aruba/matchers/base/message_indenter.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/aruba-2.2.0/lib/aruba/matchers/base/message_indenter.rb
aruba-2.2.0 lib/aruba/matchers/base/message_indenter.rb
aruba-2.1.0 lib/aruba/matchers/base/message_indenter.rb
aruba-2.0.1 lib/aruba/matchers/base/message_indenter.rb
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/aruba-2.0.0/lib/aruba/matchers/base/message_indenter.rb
aruba-2.0.0 lib/aruba/matchers/base/message_indenter.rb
aruba-1.1.2 lib/aruba/matchers/base/message_indenter.rb
aruba-1.1.1 lib/aruba/matchers/base/message_indenter.rb
aruba-1.1.0 lib/aruba/matchers/base/message_indenter.rb