Sha256: f8c81ee8edcf2e0ce7d29d82a92af80d0fed9118c6d6f576026318949d79e4dc
Contents?: true
Size: 819 Bytes
Versions: 16
Compression:
Stored size: 819 Bytes
Contents
# frozen_string_literal: true module Mongoid module Extensions module TrueClass # Get the value of the object as a mongo friendly sort value. # # @example Get the object as sort criteria. # object.__sortable__ # # @return [ Integer ] 1. def __sortable__ 1 end # 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. def is_a?(other) if other == Mongoid::Boolean || other.class == Mongoid::Boolean return true end super(other) end end end end ::TrueClass.__send__(:include, Mongoid::Extensions::TrueClass)
Version data entries
16 entries across 16 versions & 1 rubygems