Class: SportDb::QuickLeagueOutline::Section
- Inherits:
-
Struct
- Object
- Struct
- SportDb::QuickLeagueOutline::Section
- 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
-
#league ⇒ Object
Returns the value of attribute league.
-
#lines ⇒ Object
Returns the value of attribute lines.
-
#season ⇒ Object
Returns the value of attribute season.
-
#stage ⇒ Object
Returns the value of attribute stage.
Instance Method Summary collapse
-
#text ⇒ Object
for alternate line access (all-in-text string).
Instance Attribute Details
#league ⇒ Object
Returns the value of attribute league
32 33 34 |
# File 'lib/sportdb/quick/quick_league_outline.rb', line 32 def league @league end |
#lines ⇒ Object
Returns the value of attribute lines
32 33 34 |
# File 'lib/sportdb/quick/quick_league_outline.rb', line 32 def lines @lines end |
#season ⇒ Object
Returns the value of attribute season
32 33 34 |
# File 'lib/sportdb/quick/quick_league_outline.rb', line 32 def season @season end |
#stage ⇒ Object
Returns the value of attribute stage
32 33 34 |
# File 'lib/sportdb/quick/quick_league_outline.rb', line 32 def stage @stage end |
Instance Method Details
#text ⇒ Object
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 |