Class: MLB::PitchCode
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- MLB::PitchCode
- Defined in:
- lib/mlb/pitch_code.rb
Overview
Represents a pitch code (result of a pitch)
Instance Attribute Summary collapse
-
#ball_status ⇒ Boolean
Returns whether this counts as a ball.
-
#code ⇒ String
Returns the pitch code.
-
#description ⇒ String
Returns the description.
-
#sort_order ⇒ Integer
Returns the sort order.
-
#strike_status ⇒ Boolean
Returns whether this counts as a strike.
-
#swing_status ⇒ Boolean
Returns whether the batter swung.
Instance Method Summary collapse
-
#ball? ⇒ Boolean
Returns whether this counts as a ball.
-
#strike? ⇒ Boolean
Returns whether this counts as a strike.
-
#swing? ⇒ Boolean
Returns whether the batter swung.
Instance Attribute Details
#ball_status ⇒ Boolean
Returns whether this counts as a ball
47 |
# File 'lib/mlb/pitch_code.rb', line 47 attribute :ball_status, Shale::Type::Boolean |
#code ⇒ String
Returns the pitch code
15 |
# File 'lib/mlb/pitch_code.rb', line 15 attribute :code, Shale::Type::String |
#description ⇒ String
Returns the description
23 |
# File 'lib/mlb/pitch_code.rb', line 23 attribute :description, Shale::Type::String |
#sort_order ⇒ Integer
Returns the sort order
55 |
# File 'lib/mlb/pitch_code.rb', line 55 attribute :sort_order, Shale::Type::Integer |
#strike_status ⇒ Boolean
Returns whether this counts as a strike
39 |
# File 'lib/mlb/pitch_code.rb', line 39 attribute :strike_status, Shale::Type::Boolean |
#swing_status ⇒ Boolean
Returns whether the batter swung
31 |
# File 'lib/mlb/pitch_code.rb', line 31 attribute :swing_status, Shale::Type::Boolean |
Instance Method Details
#ball? ⇒ Boolean
Returns whether this counts as a ball
79 |
# File 'lib/mlb/pitch_code.rb', line 79 def ball? = ball_status |
#strike? ⇒ Boolean
Returns whether this counts as a strike
71 |
# File 'lib/mlb/pitch_code.rb', line 71 def strike? = strike_status |
#swing? ⇒ Boolean
Returns whether the batter swung
63 |
# File 'lib/mlb/pitch_code.rb', line 63 def swing? = swing_status |