Class: MLB::Handedness
- Inherits:
-
CodeDescriptionType
- Object
- Shale::Mapper
- CodeDescriptionType
- MLB::Handedness
- Defined in:
- lib/mlb/handedness.rb
Overview
Represents handedness (batting or throwing side)
Constant Summary collapse
- LEFT =
"L".freeze
- RIGHT =
"R".freeze
- SWITCH =
"S".freeze
Instance Attribute Summary
Attributes inherited from CodeDescriptionType
Instance Method Summary collapse
-
#left? ⇒ Boolean
Returns whether this is left-handed.
-
#right? ⇒ Boolean
Returns whether this is right-handed.
-
#switch? ⇒ Boolean
Returns whether this is switch (both sides).
Methods inherited from CodeDescriptionType
Instance Method Details
#left? ⇒ Boolean
Returns whether this is left-handed
16 |
# File 'lib/mlb/handedness.rb', line 16 def left? = code.eql?(LEFT) |
#right? ⇒ Boolean
Returns whether this is right-handed
24 |
# File 'lib/mlb/handedness.rb', line 24 def right? = code.eql?(RIGHT) |
#switch? ⇒ Boolean
Returns whether this is switch (both sides)
32 |
# File 'lib/mlb/handedness.rb', line 32 def switch? = code.eql?(SWITCH) |