Class: Japic::Section
- Inherits:
-
Object
- Object
- Japic::Section
- Defined in:
- lib/japic/section.rb
Instance Attribute Summary collapse
-
#match ⇒ Object
readonly
Returns the value of attribute match.
-
#sec ⇒ Object
readonly
Returns the value of attribute sec.
Instance Method Summary collapse
-
#initialize(year, response_data) ⇒ Section
constructor
A new instance of Section.
Constructor Details
#initialize(year, response_data) ⇒ Section
Returns a new instance of Section.
5 6 7 8 9 10 |
# File 'lib/japic/section.rb', line 5 def initialize(year, response_data) @sec = response_data['sec'] @match = response_data['match']&.map do |match_data| Match.new(year, match_data) end end |
Instance Attribute Details
#match ⇒ Object (readonly)
Returns the value of attribute match.
3 4 5 |
# File 'lib/japic/section.rb', line 3 def match @match end |
#sec ⇒ Object (readonly)
Returns the value of attribute sec.
3 4 5 |
# File 'lib/japic/section.rb', line 3 def sec @sec end |