lib/sportdb.rb in sportdb-1.6.18 vs lib/sportdb.rb in sportdb-1.7.0
- old
+ new
@@ -72,11 +72,11 @@
require 'sportdb/data/fixtures'
require 'sportdb/data/models' # add convenience finders for known fixtures
-module SportDB
+module SportDb
def self.banner
"sportdb #{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
end
@@ -85,10 +85,14 @@
end
def self.config_path
"#{root}/config"
end
+
+ def self.data_path
+ "#{root}/data"
+ end
def self.lang
# todo/fix: find a better way for single instance ??
if @lang.nil?
@lang = Lang.new
@@ -112,9 +116,13 @@
reader.load_setup( setup )
end
def self.read_all( include_path ) # convenience helper
read_setup( 'setups/all', include_path )
+ end
+
+ def self.read_builtin
+ read_setup( 'setups/all', data_path )
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.
\ No newline at end of file