Sha256: 7b18d6baa1e9c09c21217d59c8d38e1fd770b8b43ddffd6419b203a529598d9d

Contents?: true

Size: 730 Bytes

Versions: 12

Compression:

Stored size: 730 Bytes

Contents

module IOStreams
  class Path
    # Converts an object of this instance into a database friendly value.
    def mongoize
      to_s
    end

    # Get the object as it was stored in the database, and instantiate
    # this custom class from it.
    def self.demongoize(object)
      return if object.nil?

      IOStreams.new(object)
    end

    # Takes any possible object and converts it to how it would be
    # stored in the database.
    def self.mongoize(object)
      return if object.nil?

      object.to_s
    end

    # Converts the object that was supplied to a criteria and converts it
    # into a database friendly form.
    def self.evolve(object)
      return if object.nil?

      object.to_s
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rocketjob-6.3.1 lib/rocket_job/extensions/iostreams/path.rb
rocketjob-6.3.0 lib/rocket_job/extensions/iostreams/path.rb
rocketjob-6.2.0 lib/rocket_job/extensions/iostreams/path.rb
rocketjob-6.1.1 lib/rocket_job/extensions/iostreams/path.rb
rocketjob-6.1.0 lib/rocket_job/extensions/iostreams/path.rb
rocketjob-6.0.3 lib/rocket_job/extensions/iostreams/path.rb
rocketjob-6.0.2 lib/rocket_job/extensions/iostreams/path.rb
rocketjob-6.0.1 lib/rocket_job/extensions/iostreams/path.rb
rocketjob-6.0.0 lib/rocket_job/extensions/iostreams/path.rb
rocketjob-6.0.0.rc3 lib/rocket_job/extensions/iostreams/path.rb
rocketjob-6.0.0.rc2 lib/rocket_job/extensions/iostreams/path.rb
rocketjob-6.0.0.rc1 lib/rocket_job/extensions/iostreams/path.rb