Module: RailsAssist::File::Special::Methods
- Included in:
- RailsAssist::File::Special, RailsAssist::File::Special
- Defined in:
- lib/rails_assist/file/special.rb
Instance Method Summary collapse
Instance Method Details
#database_file ⇒ Object
23 24 25 26 |
# File 'lib/rails_assist/file/special.rb', line 23 def database_file raise "No Database file found at #{database_filepath}" if File.file? database_filepath File.new(database_filepath) end |
#database_filepath ⇒ Object
19 20 21 |
# File 'lib/rails_assist/file/special.rb', line 19 def database_filepath [RailsAssist::Directory.config_dir.path, 'database.yml'].file_join end |
#seed_file ⇒ Object
32 33 34 35 |
# File 'lib/rails_assist/file/special.rb', line 32 def seed_file raise "No Seed file found at #{seed_filepath}" if !File.exist? seed_filepath seed_filepath.new_file end |
#seed_filepath ⇒ Object
28 29 30 |
# File 'lib/rails_assist/file/special.rb', line 28 def seed_filepath [RailsAssist::Directory.db_dir.path, 'seeds.rb'].file_join end |