Sha256: e08a93fbf0bb6018d153831cadbbedc7f9c8632a9e8a6e4c16a64f7d2dfaa943

Contents?: true

Size: 484 Bytes

Versions: 8

Compression:

Stored size: 484 Bytes

Contents

module Shoulda
  module Matchers
    module ActiveModel
      module Qualifiers
        # @private
        module AllowBlank
          def initialize(*args)
            super
            @expects_to_allow_blank = false
          end

          def allow_blank
            @expects_to_allow_blank = true
            self
          end

          protected

          def expects_to_allow_blank?
            @expects_to_allow_blank
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
shoulda-matchers-6.4.0 lib/shoulda/matchers/active_model/qualifiers/allow_blank.rb
shoulda-matchers-6.3.1 lib/shoulda/matchers/active_model/qualifiers/allow_blank.rb
shoulda-matchers-6.3.0 lib/shoulda/matchers/active_model/qualifiers/allow_blank.rb
shoulda-matchers-6.2.0 lib/shoulda/matchers/active_model/qualifiers/allow_blank.rb
shoulda-matchers-6.1.0 lib/shoulda/matchers/active_model/qualifiers/allow_blank.rb
shoulda-matchers-6.0.0 lib/shoulda/matchers/active_model/qualifiers/allow_blank.rb
shoulda-matchers-5.3.0 lib/shoulda/matchers/active_model/qualifiers/allow_blank.rb
shoulda-matchers-5.2.0 lib/shoulda/matchers/active_model/qualifiers/allow_blank.rb