Module: Apartment

Defined in:
lib/apartment.rb,
lib/apartment/railtie.rb,
lib/apartment/version.rb,
lib/apartment/database.rb,
lib/apartment/migrator.rb,
lib/apartment/reloader.rb,
lib/apartment/delayed_job/hooks.rb,
lib/apartment/delayed_job/enqueue.rb,
lib/apartment/elevators/subdomain.rb,
lib/apartment/adapters/mysql_adapter.rb,
lib/apartment/delayed_job/requirements.rb,
lib/apartment/adapters/abstract_adapter.rb,
lib/apartment/adapters/postgresql_adapter.rb

Defined Under Namespace

Modules: Adapters, Database, Delayed, Elevators, Migrator Classes: AdapterNotFound, ApartmentError, DJSerializationError, Railtie, Reloader, SchemaExists, SchemaNotFound

Constant Summary collapse

VERSION =
"0.11.1"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.database_namesObject

Be careful not to use ‘return` here so both Proc and lambda can be used without breaking



15
16
17
18
19
20
21
# File 'lib/apartment.rb', line 15

def database_names
  if @database_names.respond_to?(:call)
    @database_names.call
  else
    @database_names
  end
end

.excluded_modelsObject

Default to none



24
25
26
# File 'lib/apartment.rb', line 24

def excluded_models
  @excluded_models || []
end

.prepend_environmentObject

Returns the value of attribute prepend_environment.



6
7
8
# File 'lib/apartment.rb', line 6

def prepend_environment
  @prepend_environment
end

.seed_after_createObject

Returns the value of attribute seed_after_create.



6
7
8
# File 'lib/apartment.rb', line 6

def seed_after_create
  @seed_after_create
end

.use_postgres_schemasObject

Returns the value of attribute use_postgres_schemas.



6
7
8
# File 'lib/apartment.rb', line 6

def use_postgres_schemas
  @use_postgres_schemas
end

Class Method Details

.configure {|_self| ... } ⇒ Object

configure apartment with available options

Yields:

  • (_self)

Yield Parameters:

  • _self (Apartment)

    the object that the method was called on



10
11
12
# File 'lib/apartment.rb', line 10

def configure
  yield self if block_given?
end