Class: IOStreams::Path

Inherits:
Object
  • Object
show all
Defined in:
lib/rocket_job/extensions/iostreams/path.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.demongoize(object) ⇒ Object

Get the object as it was stored in the database, and instantiate this custom class from it.



10
11
12
13
14
# File 'lib/rocket_job/extensions/iostreams/path.rb', line 10

def self.demongoize(object)
  return if object.nil?

  IOStreams.new(object)
end

.evolve(object) ⇒ Object

Converts the object that was supplied to a criteria and converts it into a database friendly form.



26
27
28
29
30
# File 'lib/rocket_job/extensions/iostreams/path.rb', line 26

def self.evolve(object)
  return if object.nil?

  object.to_s
end

.mongoize(object) ⇒ Object

Takes any possible object and converts it to how it would be stored in the database.



18
19
20
21
22
# File 'lib/rocket_job/extensions/iostreams/path.rb', line 18

def self.mongoize(object)
  return if object.nil?

  object.to_s
end

Instance Method Details

#mongoizeObject

Converts an object of this instance into a database friendly value.



4
5
6
# File 'lib/rocket_job/extensions/iostreams/path.rb', line 4

def mongoize
  to_s
end