Class: Fx::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/fx/configuration.rb

Overview

F(x)'s configuration object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



18
19
20
21
# File 'lib/fx/configuration.rb', line 18

def initialize
  @database = Fx::Adapters::Postgres.new
  @dump_functions_at_beginning_of_schema = false
end

Instance Attribute Details

#databaseObject

The F(x) database adapter instance to use when executing SQL.

Defaults to an instance of Adapters::Postgres

Returns:

  • Fx adapter



8
9
10
# File 'lib/fx/configuration.rb', line 8

def database
  @database
end

#dump_functions_at_beginning_of_schemaObject

Prioritizes the order in the schema.rb of functions before other statements in order to make directly schema load work when using functions in statements below, i.e.: default column values.

Defaults to false

Returns:

  • Boolean



16
17
18
# File 'lib/fx/configuration.rb', line 16

def dump_functions_at_beginning_of_schema
  @dump_functions_at_beginning_of_schema
end