Class: SportDb::QuickLeagueOutline::Section

Inherits:
Struct
  • Object
show all
Defined in:
lib/sportdb/quick/quick_league_outline.rb

Overview

use Section struct for easier access - why? why not?

e.g. sec.league instead of sec[:league] etc.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#leagueObject

Returns the value of attribute league

Returns:

  • (Object)

    the current value of league



32
33
34
# File 'lib/sportdb/quick/quick_league_outline.rb', line 32

def league
  @league
end

#linesObject

Returns the value of attribute lines

Returns:

  • (Object)

    the current value of lines



32
33
34
# File 'lib/sportdb/quick/quick_league_outline.rb', line 32

def lines
  @lines
end

#seasonObject

Returns the value of attribute season

Returns:

  • (Object)

    the current value of season



32
33
34
# File 'lib/sportdb/quick/quick_league_outline.rb', line 32

def season
  @season
end

#stageObject

Returns the value of attribute stage

Returns:

  • (Object)

    the current value of stage



32
33
34
# File 'lib/sportdb/quick/quick_league_outline.rb', line 32

def stage
  @stage
end

Instance Method Details

#textObject

for alternate line access (all-in-text string)



33
34
35
36
37
38
# File 'lib/sportdb/quick/quick_league_outline.rb', line 33

def text  ## for alternate line access (all-in-text string)
   txt = lines.reduce( String.new ) do |mem,line| 
            mem << line; mem << "\n"; mem 
         end
   txt
end