class SleeperRb::Utilities::RosterPosition
A string representing a roster position. See VALID_ROSTER_POSITIONS
. For every possible position in VALID_ROSTER_POSITIONS
, there is a corresponding predicate method (e.g. ‘qb?`).
Constants
- VALID_ROSTER_POSITIONS
Attributes
position[R]
Public Class Methods
new(position)
click to toggle source
# File lib/sleeper_rb/utilities/roster_position.rb, line 11 def initialize(position) @position = position.upcase end
Public Instance Methods
==(other)
click to toggle source
# File lib/sleeper_rb/utilities/roster_position.rb, line 23 def ==(other) return position == other.position.upcase if other.respond_to?(:position) position == other.upcase end