module Whowas::Searchable

Public Class Methods

included(klass) click to toggle source

extend the including class with the searchable sub-modules

# File lib/whowas/searchable.rb, line 9
def self.included klass
  klass.class_eval do
    include Validatable
    include Formattable
    include Parsable
  end
end

Public Instance Methods

adapter() click to toggle source

The including class must set the adapter class in a class constant.

# File lib/whowas/searchable.rb, line 4
def adapter
  self.class.const_get(:ADAPTER) || (raise Errors::SubclassResponsibility)
end