Class: MLB::Award
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- MLB::Award
- Includes:
- Comparable
- Defined in:
- lib/mlb/award.rb
Instance Method Summary collapse
Instance Method Details
#<=>(other) ⇒ Object
36 37 38 |
# File 'lib/mlb/award.rb', line 36 def <=>(other) sort_order <=> other.sort_order end |
#recipients(season: Time.now.year) ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/mlb/award.rb', line 40 def recipients(season: Time.now.year) params = {season:} query_string = URI.encode_www_form(params) response = CLIENT.get("awards/#{id}/recipients?#{query_string}") awards = Awards.from_json(response) awards.awards end |