Module: Fifa
- Defined in:
- lib/fifa.rb,
lib/fifa/version.rb,
lib/fifa/org_index.rb,
lib/fifa/country_index.rb,
lib/fifa/country_reader.rb,
lib/fifa/outline_reader.rb
Defined Under Namespace
Classes: CountryIndex, CountryReader, OutlineReader
Constant Summary collapse
- MAJOR =
todo: namespace inside version or something - why? why not??
2024
- MINOR =
10
- PATCH =
17
- VERSION =
[MAJOR,MINOR,PATCH].join('.')
Class Method Summary collapse
-
.[](q) ⇒ Object
search service (using world - note: NOT scoped/limted to members only).
- .banner ⇒ Object
-
.countries ⇒ Object
note: only returns fifa member countries (use world.countries for all) !!!.
-
.data_dir ⇒ Object
rename to config_dir - why? why not?.
- .members(key = :fifa) ⇒ Object
- .root ⇒ Object
- .version ⇒ Object
- .world ⇒ Object
Class Method Details
.[](q) ⇒ Object
search service (using world - note: NOT scoped/limted to members only)
36 |
# File 'lib/fifa.rb', line 36 def self.[]( q ) world[ q ]; end |
.banner ⇒ Object
12 13 14 |
# File 'lib/fifa/version.rb', line 12 def self. "fifa/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}] in (#{root})" end |
.countries ⇒ Object
note: only returns fifa member countries (use world.countries for all) !!!
33 |
# File 'lib/fifa.rb', line 33 def self.countries() world.members( :fifa ); end |
.data_dir ⇒ Object
rename to config_dir - why? why not?
20 21 22 |
# File 'lib/fifa/version.rb', line 20 def self.data_dir ## rename to config_dir - why? why not? "#{root}/config" end |
.members(key = :fifa) ⇒ Object
37 |
# File 'lib/fifa.rb', line 37 def self.members( key=:fifa ) world.members( key ); end |
.root ⇒ Object
16 17 18 |
# File 'lib/fifa/version.rb', line 16 def self.root File.( File.dirname(File.dirname(File.dirname(__FILE__))) ) end |
.version ⇒ Object
8 9 10 |
# File 'lib/fifa/version.rb', line 8 def self.version VERSION end |
.world ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/fifa.rb', line 18 def self.world @world ||= CountryIndex.read( "#{Fifa.data_dir}/africa.txt", "#{Fifa.data_dir}/asia.txt", "#{Fifa.data_dir}/caribbean.txt", "#{Fifa.data_dir}/central-america.txt", "#{Fifa.data_dir}/europe.txt", "#{Fifa.data_dir}/middle-east.txt", "#{Fifa.data_dir}/north-america.txt", "#{Fifa.data_dir}/pacific.txt", "#{Fifa.data_dir}/south-america.txt", "#{Fifa.data_dir}/history.txt" ) end |