Class: MultipleConnectionHandler::DbKey

Inherits:
Object
  • Object
show all
Defined in:
lib/multiple_connection_handler.rb

Overview

just a little token class to hand to the ActiveRecord ConnectionHandler so we can piggy-back on its connection management infrastructure. it just requires an object that you can call .name on…though it’s sort of expecting a (model) class object…


Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ DbKey

Returns a new instance of DbKey.



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

def initialize(name)
  self.name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



32
33
34
# File 'lib/multiple_connection_handler.rb', line 32

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



36
37
38
# File 'lib/multiple_connection_handler.rb', line 36

def ==(other)
  self.name == other.name
end