Class: Jets::Commands::Db::Tasks::Seeder

Inherits:
Object
  • Object
show all
Defined in:
lib/jets/commands/db/tasks.rb

Overview

Instance Method Summary collapse

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_seedObject



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