Sha256: d38786253dd13a810420d9676d12e73d418e04604060687a8c2969f6a837401f

Contents?: true

Size: 517 Bytes

Versions: 13

Compression:

Stored size: 517 Bytes

Contents

module Shoulda
  module Matchers
    # @private
    class Error < StandardError
      def self.create(attributes)
        allocate.tap do |error|
          attributes.each do |name, value|
            error.__send__("#{name}=", value)
          end

          error.__send__(:initialize)
        end
      end

      def initialize(*args)
        super
        @message = message
      end

      def message
        ''
      end

      def inspect
        %(#<#{self.class}: #{message}>)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
shoulda-matchers-6.4.0 lib/shoulda/matchers/error.rb
shoulda-matchers-6.3.1 lib/shoulda/matchers/error.rb
shoulda-matchers-6.3.0 lib/shoulda/matchers/error.rb
shoulda-matchers-6.2.0 lib/shoulda/matchers/error.rb
shoulda-matchers-6.1.0 lib/shoulda/matchers/error.rb
shoulda-matchers-6.0.0 lib/shoulda/matchers/error.rb
shoulda-matchers-5.3.0 lib/shoulda/matchers/error.rb
shoulda-matchers-5.2.0 lib/shoulda/matchers/error.rb
shoulda-matchers-5.1.0 lib/shoulda/matchers/error.rb
shoulda-matchers-5.0.0 lib/shoulda/matchers/error.rb
shoulda-matchers-5.0.0.rc1 lib/shoulda/matchers/error.rb
shoulda-matchers-4.5.1 lib/shoulda/matchers/error.rb
shoulda-matchers-4.5.0 lib/shoulda/matchers/error.rb