sports_direct 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sports_direct/basketball/ncaa.rb +4 -4
- metadata +2 -2
@@ -8,7 +8,7 @@ module SportsDirect
|
|
8
8
|
|
9
9
|
def schedule
|
10
10
|
(API.ncaa_basketball_schedule / 'competition').collect do |event|
|
11
|
-
|
11
|
+
normalize_event(event)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -33,7 +33,7 @@ module SportsDirect
|
|
33
33
|
end
|
34
34
|
private :team_names
|
35
35
|
|
36
|
-
def
|
36
|
+
def normalize_event(event)
|
37
37
|
details = event.at('details')
|
38
38
|
venue = details.at('venue')
|
39
39
|
locality = venue.at('location/city').text
|
@@ -66,7 +66,7 @@ module SportsDirect
|
|
66
66
|
true
|
67
67
|
),
|
68
68
|
:tbd => details.at('date-tbd').text == 'true',
|
69
|
-
:venue_name => venue.at('name').text,
|
69
|
+
:venue_name => normalize_venue_name(venue.at('name').text),
|
70
70
|
:locality => locality,
|
71
71
|
:region => normalize_region(region.to_s),
|
72
72
|
:country => venue.at('location/country').text,
|
@@ -74,7 +74,7 @@ module SportsDirect
|
|
74
74
|
:away_name => away_name
|
75
75
|
}
|
76
76
|
end
|
77
|
-
private :
|
77
|
+
private :normalize_event
|
78
78
|
|
79
79
|
def normalize_performer_name(name)
|
80
80
|
name.gsub!(/&/, '&')
|