Sha256: ec1f794a3ea7cbbfc36c22ab15ee2e0490c3e60b277276b28c673c860a9c939c

Contents?: true

Size: 517 Bytes

Versions: 15

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

15 entries across 15 versions & 1 rubygems

Version Path
shoulda-matchers-4.4.1 lib/shoulda/matchers/error.rb
shoulda-matchers-4.4.0 lib/shoulda/matchers/error.rb
shoulda-matchers-4.3.0 lib/shoulda/matchers/error.rb
shoulda-matchers-4.2.0 lib/shoulda/matchers/error.rb
shoulda-matchers-4.1.2 lib/shoulda/matchers/error.rb
shoulda-matchers-4.1.1 lib/shoulda/matchers/error.rb
shoulda-matchers-4.1.0 lib/shoulda/matchers/error.rb
shoulda-matchers-4.0.1 lib/shoulda/matchers/error.rb
shoulda-matchers-3.1.3 lib/shoulda/matchers/error.rb
shoulda-matchers-4.0.0.rc1 lib/shoulda/matchers/error.rb
shoulda-matchers-3.1.2 lib/shoulda/matchers/error.rb
shoulda-matchers-3.1.1 lib/shoulda/matchers/error.rb
shoulda-matchers-3.1.0 lib/shoulda/matchers/error.rb
shoulda-matchers-3.0.1 lib/shoulda/matchers/error.rb
shoulda-matchers-3.0.0 lib/shoulda/matchers/error.rb