Top Level Namespace
Defined Under Namespace
Modules: Datafile
Constant Summary collapse
- WorldDataset =
note: add “known” dataset classes to global namespace - why? why not?
add "global" shortcuts for now
Datafile::WorldDataset
- FootballDataset =
Datafile::FootballDataset
- BeerDataset =
Datafile::BeerDataset
Instance Method Summary collapse
-
#fetcher ⇒ Object
add (HTTP/S) download support (of blobs/binaries/zips).
-
#read_known_datasets(path) ⇒ Object
fix: move global method to ??.
Instance Method Details
#fetcher ⇒ Object
add (HTTP/S) download support (of blobs/binaries/zips)
2 |
# File 'lib/datafile.rb', line 2 require 'fetcher' |
#read_known_datasets(path) ⇒ Object
fix: move global method to ??
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/datafile/dataset.rb', line 5 def read_known_datasets( path ) ary = [] lines = File.open( path, 'r:utf-8' ) {|f| f.read } lines.each_line do |line| ## skip blank and comments lines next if /^\s*#/ =~ line || /^\s*$/ =~ line ary << line.strip end ary end |