Class: BetterSeeder::Configuration
- Inherits:
-
Object
- Object
- BetterSeeder::Configuration
- Defined in:
- lib/better_seeder/configuration.rb
Instance Attribute Summary collapse
-
#log_language ⇒ Object
Returns the value of attribute log_language.
-
#log_level ⇒ Object
Returns the value of attribute log_level.
-
#preload_path ⇒ Object
Returns the value of attribute preload_path.
-
#structure_path ⇒ Object
Returns the value of attribute structure_path.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_language ⇒ Object
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_level ⇒ Object
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_path ⇒ Object
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_path ⇒ Object
Returns the value of attribute structure_path.
7 8 9 |
# File 'lib/better_seeder/configuration.rb', line 7 def structure_path @structure_path end |