lib/sportradar/api/baseball/pitch.rb in sportradar-api-0.10.43 vs lib/sportradar/api/baseball/pitch.rb in sportradar-api-0.10.44
- old
+ new
@@ -38,10 +38,14 @@
def pitches
@pitches_hash.values
end
+ def homerun?
+ @outcome_id == 'aHR'
+ end
+
def foul?
['kF','kFT'].include? @outcome_id
end
def ball?
@@ -126,9 +130,10 @@
def self.pitch_type(code)
pitch_types[code]
end
+
def self.pitch_types
@pitch_types ||= {
'FA' => 'Fastball',
'SI' => 'Sinker',
'CT' => 'Cutter',