Sha256: 58786993835f6d44d2a75603ebc038dd67cc1f236b107d371f70f8046ae1e0e8

Contents?: true

Size: 1.05 KB

Versions: 21

Compression:

Stored size: 1.05 KB

Contents

# encoding: utf-8

module SportDb
  module FixtureHelpers


  def find_teams!( line ) # NB: returns an array - note: plural! (teamsss)
    TextUtils.find_keys_for!( 'team', line )
  end
  
  def find_team!( line )  # NB: returns key (string or nil)
    TextUtils.find_key_for!( 'team', line )
  end

  ## todo: check if find_team1 gets used?  if not remove it!!  use find_teams!
  def find_team1!( line )
    TextUtils.find_key_for!( 'team1', line )
  end

  def find_team2!( line )
    TextUtils.find_key_for!( 'team2', line )
  end

  ## todo/fix: pass in known_teams as a parameter? why? why not?

  def map_teams!( line )
    TextUtils.map_titles_for!( 'team', line, @known_teams )
  end
  
  def map_team!( line )  # alias map_teams!
    map_teams!( line )
  end


  ## depreciated methods - use map_
  def match_teams!( line )   ## fix: rename to map_teams!! - remove match_teams!
    ## todo: issue depreciated warning
    map_teams!( line )
  end # method match_teams!


  end # module FixtureHelpers
end # module SportDb

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
sportdb-models-1.14.2 lib/sportdb/utils_teams.rb
sportdb-models-1.14.1 lib/sportdb/utils_teams.rb
sportdb-models-1.14.0 lib/sportdb/utils_teams.rb
sportdb-models-1.13.0 lib/sportdb/utils_teams.rb
sportdb-models-1.12.0 lib/sportdb/utils_teams.rb
sportdb-models-1.11.2 lib/sportdb/utils_teams.rb
sportdb-models-1.11.1 lib/sportdb/utils_teams.rb
sportdb-models-1.11.0 lib/sportdb/utils_teams.rb
sportdb-models-1.10.1 lib/sportdb/utils_teams.rb
sportdb-models-1.10.0 lib/sportdb/utils_teams.rb
sportdb-1.9.16 lib/sportdb/utils_teams.rb
sportdb-1.9.15 lib/sportdb/utils_teams.rb
sportdb-1.9.14 lib/sportdb/utils_teams.rb
sportdb-1.9.13 lib/sportdb/utils_teams.rb
sportdb-1.9.12 lib/sportdb/utils_teams.rb
sportdb-1.9.11 lib/sportdb/utils_teams.rb
sportdb-1.9.10 lib/sportdb/utils_teams.rb
sportdb-1.9.9 lib/sportdb/utils_teams.rb
sportdb-1.9.8 lib/sportdb/utils_teams.rb
sportdb-1.9.7 lib/sportdb/utils_teams.rb