Module: DB::AbstractInterface::Methods

Defined in:
lib/db/abstract_interface.rb

Instance Method Summary collapse

Instance Method Details

#api_not_implemented(klass, method_name = nil) ⇒ Object


14
15
16
17
18
19
20
# File 'lib/db/abstract_interface.rb', line 14

def api_not_implemented(klass, method_name = nil)
  if method_name.nil?
    caller.first.match(/in \`(.+)\'/)
    method_name = $1
  end
  raise AbstractInterface::InterfaceNotImplementedError.new("#{klass.class.name} needs to implement '#{method_name}' for interface #{self.name}!")
end