lib/sportdb.rb in sportdb-0.4.3 vs lib/sportdb.rb in sportdb-0.4.4
- old
+ new
@@ -54,13 +54,26 @@
# load built-in (that is, bundled within the gem) named seeds
# - pass in an array of seed names e.g. [ 'cl/teams', 'cl/2012_13/cl' ] etc.
- def self.load( args )
- Loader.new.run( args )
+ def self.load( ary )
+ loader = Loader.new
+ ary.each do |name|
+ loader.load_fixtures_builtin( name )
+ end
end
-
+
+ # load built-in (that is, bundled within the gem) named plain text seeds
+ # - pass in an array of pairs of event/seed names e.g. [['at.2012/13', 'at/2012_13/bl'], ['cl.2012/13', 'cl/2012_13/cl']] etc.
+
+ def self.read( ary )
+ reader = Reader.new
+ ary.each do |rec|
+ reader.load_fixtures_builtin( rec[0], rec[1] ) # event_key, name
+ end
+ end
+
class Deleter
## todo: move into its own file???
## make models available in sportdb module by default with namespace
\ No newline at end of file