Class: Infostrada::Competition
- Inherits:
-
Object
- Object
- Infostrada::Competition
- Defined in:
- lib/infostrada/competition.rb
Overview
n_CompetitionSet is an indicator for the type of Competition:
1 = domestic league 2 = domestic cup 3 = international club competition (e.g. Champions League) 4 = country competition (e.g. World Cup)
n_CompetitionLevel is an indicator for the level of a domestic competition:
1 = highest level (e.g. German Bundesliga) 2 = 2nd highest level (e.g. German 2. Bundesliga) 3 = 3rd highest level and so on
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#level ⇒ Object
Returns the value of attribute level.
-
#name ⇒ Object
Returns the value of attribute name.
-
#nation ⇒ Object
Returns the value of attribute nation.
-
#set ⇒ Object
Returns the value of attribute set.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Competition
constructor
A new instance of Competition.
Constructor Details
#initialize(hash) ⇒ Competition
Returns a new instance of Competition.
17 18 19 20 21 22 |
# File 'lib/infostrada/competition.rb', line 17 def initialize(hash) @id = hash.delete('n_CompetitionID') @name = hash.delete('c_Competition') @nation = Nation.new(hash, 'competition') end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
15 16 17 |
# File 'lib/infostrada/competition.rb', line 15 def id @id end |
#level ⇒ Object
Returns the value of attribute level.
15 16 17 |
# File 'lib/infostrada/competition.rb', line 15 def level @level end |
#name ⇒ Object
Returns the value of attribute name.
15 16 17 |
# File 'lib/infostrada/competition.rb', line 15 def name @name end |
#nation ⇒ Object
Returns the value of attribute nation.
15 16 17 |
# File 'lib/infostrada/competition.rb', line 15 def nation @nation end |
#set ⇒ Object
Returns the value of attribute set.
15 16 17 |
# File 'lib/infostrada/competition.rb', line 15 def set @set end |