Sha256: ea5be1bea0bc9c98e915ed5aed809e4b321ab7878daebc494e1b41eee501e6f8

Contents?: true

Size: 963 Bytes

Versions: 15

Compression:

Stored size: 963 Bytes

Contents

module Sportradar
  module Api
    module Baseball
      class Runner < Data
        attr_accessor :response, :id, :starting_base, :ending_base, :outcome_id, :out, :description, :fielders

        def initialize(data, **opts)
          @response = data
          # @game     = opts[:game]

          update(data)
        end
        def update(data, **opts)
          @id             = data["id"]
          @starting_base  = data["starting_base"]
          @ending_base    = data["ending_base"]
          @outcome_id     = data["outcome_id"]
          @out            = data["out"]
          @last_name      = data["last_name"]
          @first_name     = data["first_name"]
          @preferred_name = data["preferred_name"]
          @jersey_number  = data["jersey_number"]
          @description    = data['description']
          @fielders       = data['fielders'].map { |hash| Fielder.new(hash) } if data['fielders']
        end

      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
sportradar-api-0.10.28 lib/sportradar/api/baseball/runner.rb
sportradar-api-0.10.27 lib/sportradar/api/baseball/runner.rb
sportradar-api-0.10.26 lib/sportradar/api/baseball/runner.rb
sportradar-api-0.10.25 lib/sportradar/api/baseball/runner.rb
sportradar-api-0.10.24 lib/sportradar/api/baseball/runner.rb
sportradar-api-0.10.23 lib/sportradar/api/baseball/runner.rb
sportradar-api-0.10.22 lib/sportradar/api/baseball/runner.rb
sportradar-api-0.10.21 lib/sportradar/api/baseball/runner.rb
sportradar-api-0.10.20 lib/sportradar/api/baseball/runner.rb
sportradar-api-0.10.19 lib/sportradar/api/baseball/runner.rb
sportradar-api-0.10.18 lib/sportradar/api/baseball/runner.rb
sportradar-api-0.10.17 lib/sportradar/api/baseball/runner.rb
sportradar-api-0.10.16 lib/sportradar/api/baseball/runner.rb
sportradar-api-0.10.15 lib/sportradar/api/baseball/runner.rb
sportradar-api-0.10.14 lib/sportradar/api/baseball/runner.rb