Class: Sports::Club

Inherits:
Object
  • Object
show all
Defined in:
lib/sportdb/search/structs.rb

Class Method Summary collapse

Class Method Details

._searchObject

use service/api or such - why? why not?



48
49
50
# File 'lib/sportdb/search/structs.rb', line 48

def self._search #### use service/api or such - why? why not?
    SportDb::Import.catalog.clubs
end

.build_mods(mods) ⇒ Object



74
75
76
# File 'lib/sportdb/search/structs.rb', line 74

def self.build_mods( mods )
   _search_build_mods( mods )
end

.find(name) ⇒ Object



60
# File 'lib/sportdb/search/structs.rb', line 60

def self.find( name )   _search.find_by( name: name ); end

.find!(name) ⇒ Object



61
# File 'lib/sportdb/search/structs.rb', line 61

def self.find!( name )  _search.find_by!( name: name ); end

.find_by(name:, country: nil, league: nil) ⇒ Object



68
69
70
71
72
# File 'lib/sportdb/search/structs.rb', line 68

def self.find_by( name:, country: nil,
                         league:  nil )
   _search.find_by( name: name, country: country,
                                league: league )
end

.find_by!(name:, country: nil, league: nil) ⇒ Object



63
64
65
66
67
# File 'lib/sportdb/search/structs.rb', line 63

def self.find_by!( name:, country: nil,
                          league:  nil )
   _search.find_by!( name: name, country: country,
                                 league: league )
end

.match(name) ⇒ Object



58
# File 'lib/sportdb/search/structs.rb', line 58

def self.match( name ) match_by( name: name ); end

.match_by(name:, country: nil, league: nil, mods: nil) ⇒ Object



52
53
54
55
56
57
# File 'lib/sportdb/search/structs.rb', line 52

def self.match_by( name:, country: nil,
                     league:  nil,
                     mods:    nil )
    _search.match_by( name: name, country: country,
                      league: league, mods: mods )
end