Sha256: 9b91d0ab9dee8ec725b26b69cfbaac40ad838bef740f7e503dfa04e759799941

Contents?: true

Size: 429 Bytes

Versions: 62

Compression:

Stored size: 429 Bytes

Contents

class GlobalID
  class << self
    def demongoize(object)
      GlobalID.new(object)
    end

    def mongoize(object)
      case object
      when GlobalID then object.mongoize
      when String then GlobalID.new(object).mongoize
      else object
      end
    end

    def evolve(object)
      case object
      when GlobalID then object.mongoize
      else object
      end
    end
  end

  alias_method :mongoize, :to_s
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.5.26 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.4.45 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.5.25 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.5.23 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.4.44 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.5.22 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.4.43 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.5.21 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.4.42 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.5.20 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.4.41 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.5.19 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.4.40 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.5.18 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.4.39 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.5.17 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.4.38 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.5.16 lib/workarea/ext/freedom_patches/global_id.rb
workarea-core-3.4.37 lib/workarea/ext/freedom_patches/global_id.rb