Module: Sumaki::Model::ClassMethods

Defined in:
lib/sumaki/model.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#adapterObject



175
176
177
# File 'lib/sumaki/model.rb', line 175

def adapter
  @adapter || parent&.adapter || Config.default_adapter
end

#parentObject

Returns the value of attribute parent.



173
174
175
# File 'lib/sumaki/model.rb', line 173

def parent
  @parent
end

Instance Method Details

#_sumaki_methods_moduleObject



179
180
181
182
183
184
185
# File 'lib/sumaki/model.rb', line 179

def _sumaki_methods_module
  @_sumaki_methods_module ||= begin
    mod = Module.new
    include mod
    mod
  end
end