Parent

Methods

SeedFu::Runner

Runs seed files.

It is not recommended to use this class directly. Instead, use {SeedFu.seed SeedFu.seed}, which creates an instead of {Runner} and calls {run run}.

@see SeedFu.seed SeedFu.seed

Public Class Methods

new(fixture_paths = nil, filter = nil) click to toggle source

@param [Array<String>] fixture_paths The paths where fixtures are located. Will use

`SeedFu.fixture_paths` if {nil}. If the argument is not an array, it will be wrapped by one.

@param [Regexp] filter If given, only seed files with a file name matching this pattern will

be used
# File lib/seed-fu/runner.rb, line 16
def initialize(fixture_paths = nil, filter = nil)
  @fixture_paths = Array.wrap(fixture_paths || SeedFu.fixture_paths)
  @filter        = filter
end

Public Instance Methods

run() click to toggle source

Run the seed files.

# File lib/seed-fu/runner.rb, line 22
def run
  puts "\n== Filtering seed files against regexp: #{@filter.inspect}" if @filter && !SeedFu.quiet

  filenames.each do |filename|
    run_file(filename)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.