lib/sportradar/api/baseball/pitch.rb in sportradar-api-0.10.23 vs lib/sportradar/api/baseball/pitch.rb in sportradar-api-0.10.24
- old
+ new
@@ -1,10 +1,10 @@
module Sportradar
module Api
module Baseball
class Pitch < Data
- attr_accessor :response, :id, :at_bat, :outcome_id, :status, :count, :is_ab_over, :warming_up, :runners
+ attr_accessor :response, :id, :at_bat, :outcome_id, :status, :count, :is_ab_over, :warming_up, :runners, :errors
def initialize(data, **opts)
@response = data
@api = opts[:api]
@at_bat = opts[:at_bat]
@@ -45,10 +45,10 @@
def parse_runners(data)
@runners = data.map { |hash| Runner.new(hash) }
end
def parse_errors(data)
- @runners = data.map { |hash| Error.new(hash) }
+ @errors = data.map { |hash| Error.new(hash) }
end
def parse_fielders(data)
@fielders = data.map { |hash| Fielder.new(hash) }
end