Class: Japic::Section

Inherits:
Object
  • Object
show all
Defined in:
lib/japic/section.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#matchObject (readonly)

Returns the value of attribute match.



3
4
5
# File 'lib/japic/section.rb', line 3

def match
  @match
end

#secObject (readonly)

Returns the value of attribute sec.



3
4
5
# File 'lib/japic/section.rb', line 3

def sec
  @sec
end