Class: Jets::Commands::Db::Tasks::Seeder
- Inherits:
-
Object
- Object
- Jets::Commands::Db::Tasks::Seeder
- Defined in:
- lib/jets/commands/db/tasks.rb
Overview
Instance Method Summary collapse
-
#initialize(seed_file) ⇒ Seeder
constructor
A new instance of Seeder.
- #load_seed ⇒ Object
Constructor Details
#initialize(seed_file) ⇒ Seeder
Returns a new instance of Seeder.
25 26 27 |
# File 'lib/jets/commands/db/tasks.rb', line 25 def initialize(seed_file) @seed_file = seed_file end |
Instance Method Details
#load_seed ⇒ Object
29 30 31 32 |
# File 'lib/jets/commands/db/tasks.rb', line 29 def load_seed raise "Seed file '#{@seed_file}' does not exist" unless File.file?(@seed_file) load @seed_file end |