class Sportradar::Mlb::Models::Runner

Attributes

runner[R]

Public Class Methods

new(runner: {}) click to toggle source
# File lib/sportradar/mlb/models/runner.rb, line 5
def initialize(runner: {})
  @runner = runner
end

Public Instance Methods

first_name() click to toggle source
# File lib/sportradar/mlb/models/runner.rb, line 13
def first_name
  runner['first_name']
end
id() click to toggle source
# File lib/sportradar/mlb/models/runner.rb, line 9
def id
  runner['id']
end
jersey_number() click to toggle source
# File lib/sportradar/mlb/models/runner.rb, line 17
def jersey_number
  runner['jersey_number']
end
last_name() click to toggle source
# File lib/sportradar/mlb/models/runner.rb, line 21
def last_name
  runner['last_name']
end
preferred_name() click to toggle source
# File lib/sportradar/mlb/models/runner.rb, line 25
def preferred_name
  runner['preferred_name']
end
starting_base() click to toggle source
# File lib/sportradar/mlb/models/runner.rb, line 29
def starting_base
  runner['starting_base']
end
starting_base_label() click to toggle source
# File lib/sportradar/mlb/models/runner.rb, line 43
def starting_base_label
  if starting_base
    if starting_base == 0
      'HP'
    else
      "#{starting_base}B"
    end
  end
end
starting_base_name() click to toggle source
# File lib/sportradar/mlb/models/runner.rb, line 33
def starting_base_name
  if starting_base
    if starting_base == 0
      'Home'
    else
      "#{ActiveSupport::Inflector.ordinalize(starting_base)} base"
    end
  end
end