Class: Distant::Base
- Inherits:
-
Object
- Object
- Distant::Base
- Defined in:
- lib/distant/base.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #connection ⇒ Object
-
#initialize(attrs = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(attrs = {}) ⇒ Base
Returns a new instance of Base.
6 7 8 9 10 |
# File 'lib/distant/base.rb', line 6 def initialize(attrs={}) attrs.each do |key, val| send "#{key}=", val end end |
Class Method Details
.inherited(klass) ⇒ Object
12 13 14 |
# File 'lib/distant/base.rb', line 12 def self.inherited(klass) klass.extend(ClassMethods) end |
Instance Method Details
#connection ⇒ Object
16 17 18 |
# File 'lib/distant/base.rb', line 16 def connection self.class.connection end |