Class: BetterSeeder::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/better_seeder/configuration.rb', line 9

def initialize
  @log_language   = :en
  @log_level      = :info
  if defined?(Rails) && Rails.respond_to?(:root)
    @structure_path = Rails.root.join('db', 'seed', 'structure')
    @preload_path   = Rails.root.join('db', 'seed', 'preload')
  else
    @structure_path = File.join(Dir.pwd, 'db', 'seed', 'structure')
    @preload_path   = File.join(Dir.pwd, 'db', 'seed', 'preload')
  end
end

Instance Attribute Details

#log_languageObject

Returns the value of attribute log_language.



7
8
9
# File 'lib/better_seeder/configuration.rb', line 7

def log_language
  @log_language
end

#log_levelObject

Returns the value of attribute log_level.



7
8
9
# File 'lib/better_seeder/configuration.rb', line 7

def log_level
  @log_level
end

#preload_pathObject

Returns the value of attribute preload_path.



7
8
9
# File 'lib/better_seeder/configuration.rb', line 7

def preload_path
  @preload_path
end

#structure_pathObject

Returns the value of attribute structure_path.



7
8
9
# File 'lib/better_seeder/configuration.rb', line 7

def structure_path
  @structure_path
end