Sha256: f8b5aac8ee636bca7af86867adc1895e666ee810574b0bd143fee17ff1bb0973

Contents?: true

Size: 1.03 KB

Versions: 7

Compression:

Stored size: 1.03 KB

Contents

module Sportradar
  module Api
    module Baseball
      class Event
        class Lineup < Data
          attr_accessor :response, :id, :hitter_id, :outcome, :description, :player_id, :order, :position, :team_id, :last_name, :first_name, :preferred_name, :jersey_number

          def initialize(data, **opts)
            @response       =  data
            @id             =  data["id"]
            @player_id      =  data["player_id"]
            @order          =  data["order"]
            @position       =  data["position"]
            @team_id        =  data["team_id"]
            @last_name      =  data["last_name"]
            @first_name     =  data["first_name"]
            @preferred_name =  data["preferred_name"]
            @jersey_number  =  data["jersey_number"            ]

            update(data)
          end

          def update(data, **opts)
            @description = data['description'] if data['description']
          end

          def data_key
            'lineup'
          end

        end
      end
    end
  end
end



Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sportradar-api-0.10.36 lib/sportradar/api/baseball/events/lineup.rb
sportradar-api-0.10.35 lib/sportradar/api/baseball/events/lineup.rb
sportradar-api-0.10.34 lib/sportradar/api/baseball/events/lineup.rb
sportradar-api-0.10.33 lib/sportradar/api/baseball/events/lineup.rb
sportradar-api-0.10.32 lib/sportradar/api/baseball/events/lineup.rb
sportradar-api-0.10.31 lib/sportradar/api/baseball/events/lineup.rb
sportradar-api-0.10.30 lib/sportradar/api/baseball/events/lineup.rb