Class: Infostrada::Edition
- Inherits:
-
Object
- Object
- Infostrada::Edition
- Extended by:
- Forwardable
- Defined in:
- lib/infostrada/edition.rb
Instance Attribute Summary collapse
-
#competition ⇒ Object
Returns the value of attribute competition.
-
#end_date ⇒ Object
Returns the value of attribute end_date.
-
#id ⇒ Object
Returns the value of attribute id.
-
#season ⇒ Object
Returns the value of attribute season.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash) ⇒ Edition
constructor
A new instance of Edition.
-
#phases ⇒ Object
Get phases for this edition.
- #teams ⇒ Object
Constructor Details
#initialize(hash) ⇒ Edition
Returns a new instance of Edition.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/infostrada/edition.rb', line 16 def initialize(hash) @id = hash.delete('n_EditionID') @season = hash.delete('c_Season') @start_date = Formatter.format_date(hash.delete('d_EditionStartDate')) @end_date = Formatter.format_date(hash.delete('d_EditionEndDate')) @competition = Competition.new(hash) self end |
Instance Attribute Details
#competition ⇒ Object
Returns the value of attribute competition.
7 8 9 |
# File 'lib/infostrada/edition.rb', line 7 def competition @competition end |
#end_date ⇒ Object
Returns the value of attribute end_date.
7 8 9 |
# File 'lib/infostrada/edition.rb', line 7 def end_date @end_date end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/infostrada/edition.rb', line 7 def id @id end |
#season ⇒ Object
Returns the value of attribute season.
7 8 9 |
# File 'lib/infostrada/edition.rb', line 7 def season @season end |
#start_date ⇒ Object
Returns the value of attribute start_date.
7 8 9 |
# File 'lib/infostrada/edition.rb', line 7 def start_date @start_date end |
Class Method Details
.all ⇒ Object
12 13 14 |
# File 'lib/infostrada/edition.rb', line 12 def self.all editions = EditionRequest.get_list end |