Class: Migflow::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



18
19
20
21
22
23
24
25
26
# File 'lib/migflow/configuration.rb', line 18

def initialize
  @migrations_path          = nil
  @schema_path              = nil
  @enabled_rules            = :all
  @authentication_hook      = nil
  @expose_raw_content       = true
  @parent_controller        = "ActionController::Base"
  @unauthenticated_redirect = nil
end

Instance Attribute Details

#authentication_hookObject

Returns the value of attribute authentication_hook.



15
16
17
# File 'lib/migflow/configuration.rb', line 15

def authentication_hook
  @authentication_hook
end

#enabled_rulesObject

Returns the value of attribute enabled_rules.



15
16
17
# File 'lib/migflow/configuration.rb', line 15

def enabled_rules
  @enabled_rules
end

#expose_raw_contentObject

Returns the value of attribute expose_raw_content.



15
16
17
# File 'lib/migflow/configuration.rb', line 15

def expose_raw_content
  @expose_raw_content
end

#migrations_pathObject

Returns the value of attribute migrations_path.



15
16
17
# File 'lib/migflow/configuration.rb', line 15

def migrations_path
  @migrations_path
end

#parent_controllerObject

Returns the value of attribute parent_controller.



15
16
17
# File 'lib/migflow/configuration.rb', line 15

def parent_controller
  @parent_controller
end

#schema_pathObject

Returns the value of attribute schema_path.



15
16
17
# File 'lib/migflow/configuration.rb', line 15

def schema_path
  @schema_path
end

#unauthenticated_redirectObject

Returns the value of attribute unauthenticated_redirect.



15
16
17
# File 'lib/migflow/configuration.rb', line 15

def unauthenticated_redirect
  @unauthenticated_redirect
end

Instance Method Details

#resolved_migrations_pathObject



28
29
30
# File 'lib/migflow/configuration.rb', line 28

def resolved_migrations_path
  migrations_path || Rails.root.join("db/migrate")
end

#resolved_schema_pathObject



32
33
34
# File 'lib/migflow/configuration.rb', line 32

def resolved_schema_path
  schema_path || Rails.root.join("db/schema.rb")
end