Sha256: fb1f39c44aa119c0341a89c0a6c5c4177bb5792e343b4a1ff212daa84f5609ba

Contents?: true

Size: 605 Bytes

Versions: 188

Compression:

Stored size: 605 Bytes

Contents

# encoding: utf-8
module Mongoid #:nodoc:
  module Extensions #:nodoc:
    module TrueClass #:nodoc:

      # Adds equality hooks for true values.
      module Equality

        # Is the passed value a boolean?
        #
        # @example Is the value a boolean type?
        #   true.is_a?(Boolean)
        #
        # @param [ Class ] other The class to check.
        #
        # @return [ true, false ] If the other is a boolean.
        #
        # @since 1.0.0
        def is_a?(other)
          return true if other.name == "Boolean"
          super(other)
        end
      end
    end
  end
end

Version data entries

188 entries across 96 versions & 4 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.5 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.5 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.4 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.4 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.4 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.3 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.3 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.3 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/extensions/true_class/equality.rb
mongoid-2.8.1 lib/mongoid/extensions/true_class/equality.rb
mongoid-2.8.0 lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.2 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.2 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.2 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.1 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.1 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.1 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.0 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.0 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/extensions/true_class/equality.rb
classiccms-0.7.0 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/extensions/true_class/equality.rb