Sha256: 6e842ed2d265dfba1912da2948f6165cf400966a0b17b860017cf9f1d22208f5
Contents?: true
Size: 883 Bytes
Versions: 21
Compression:
Stored size: 883 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 module Mongoid module Extensions module FalseClass # Get the value of the object as a mongo friendy sort value. # # @example Get the object as sort criteria. # object.__sortable__ # # @return [ Integer ] 0. # # @since 3.0.0 def __sortable__ 0 end # Is the passed value a boolean? # # @example Is the value a boolean type? # false.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) if other == ::Boolean || other.class == ::Boolean return true end super(other) end end end end ::FalseClass.__send__(:include, Mongoid::Extensions::FalseClass)
Version data entries
21 entries across 21 versions & 2 rubygems