module Apartment

def configure

configure apartment with available options
def configure
  yield self if block_given?
end

def database_names

Be careful not to use `return` here so both Proc and lambda can be used without breaking
def database_names
  if @database_names.respond_to?(:call)
    @database_names.call
  else
    @database_names
  end
end

def excluded_models

Default to none
def excluded_models
  @excluded_models || []
end

def load_schema

Defaults to true if not set
def load_schema
  @load_schema != false
end

def reset

Reset all the config for Apartment
def reset
  (ACCESSOR_METHODS + WRITER_METHODS).each{|method| instance_variable_set(:"@#{method}", nil) }
end