Class: Japic::Response::Schedule

Inherits:
Base
  • Object
show all
Defined in:
lib/japic/response/schedule.rb

Instance Attribute Summary

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

#body, #count, #initialize, #league, #status, #year

Constructor Details

This class inherits a constructor from Japic::Response::Base

Instance Method Details

#section_allObject



4
5
6
# File 'lib/japic/response/schedule.rb', line 4

def section_all
  body['sec']
end

#section_of(n) ⇒ Object



8
9
10
11
12
# File 'lib/japic/response/schedule.rb', line 8

def section_of(n)
  section = section_all.fetch(n - 1)

  ::Japic::Section.new(year, section)
end