Module: Humanoid::Enslavement::ClassMethods

Defined in:
lib/humanoid/enslavement.rb

Overview

:nodoc

Instance Method Summary collapse

Instance Method Details

#enslaveObject

Set whether or not this documents read operations should delegate to the slave database by default.

Example:

class Person
  include Humanoid::Document
  enslave
end


24
25
26
# File 'lib/humanoid/enslavement.rb', line 24

def enslave
  self.enslaved = true
end

#enslaved?Boolean

Determines if the class is enslaved or not.

Returns:

True if enslaved, false if not.

Returns:



33
34
35
# File 'lib/humanoid/enslavement.rb', line 33

def enslaved?
  self.enslaved == true
end