Class: MLB::PlayMatchup

Inherits:
Shale::Mapper
  • Object
show all
Defined in:
lib/mlb/play.rb

Overview

Represents the matchup during a play

Instance Attribute Summary collapse

Instance Attribute Details

#bat_side ⇒ Handedness

Returns the bat side

Examples:

matchup.bat_side #=> #<MLB::Handedness>

Returns:



233
# File 'lib/mlb/play.rb', line 233

attribute :bat_side, Handedness

#batter ⇒ Player

Returns the batter

Examples:

matchup.batter #=> #<MLB::Player>

Returns:



225
# File 'lib/mlb/play.rb', line 225

attribute :batter, Player

#pitch_hand ⇒ Handedness

Returns the pitch hand

Examples:

matchup.pitch_hand #=> #<MLB::Handedness>

Returns:



249
# File 'lib/mlb/play.rb', line 249

attribute :pitch_hand, Handedness

#pitcher ⇒ Player

Returns the pitcher

Examples:

matchup.pitcher #=> #<MLB::Player>

Returns:



241
# File 'lib/mlb/play.rb', line 241

attribute :pitcher, Player