Class: Sightstone::MiniSeries
- Inherits:
-
Object
- Object
- Sightstone::MiniSeries
- Defined in:
- lib/sightstone/league.rb
Overview
Class to represent a MiniSeries (Promotion games)
Instance Attribute Summary collapse
-
#losses ⇒ Fixnum
number of lost games of the series.
-
#progress ⇒ Object
Returns the value of attribute progress.
-
#target ⇒ Fixnum
number of required wins to win the series.
-
#timeLeftToPlayMillis ⇒ Fixnum
time left to complete the series.
-
#win/loose ⇒ String
history as a string.
-
#wins ⇒ Fixnum
number of won games of the series.
Instance Method Summary collapse
-
#initialize(data) ⇒ MiniSeries
constructor
A new instance of MiniSeries.
Constructor Details
#initialize(data) ⇒ MiniSeries
Returns a new instance of MiniSeries.
66 67 68 69 70 71 72 |
# File 'lib/sightstone/league.rb', line 66 def initialize(data) @losses = data['losses'] @wins = data['wins'] @target = data['target'] @progress = data['progress'] @timeLeftToPlayMillis = data['timeLeftToPlayMillis'] end |
Instance Attribute Details
#losses ⇒ Fixnum
number of lost games of the series
64 65 66 |
# File 'lib/sightstone/league.rb', line 64 def losses @losses end |
#progress ⇒ Object
Returns the value of attribute progress.
65 66 67 |
# File 'lib/sightstone/league.rb', line 65 def progress @progress end |
#target ⇒ Fixnum
number of required wins to win the series
64 65 66 |
# File 'lib/sightstone/league.rb', line 64 def target @target end |
#timeLeftToPlayMillis ⇒ Fixnum
time left to complete the series
64 65 66 |
# File 'lib/sightstone/league.rb', line 64 def timeLeftToPlayMillis @timeLeftToPlayMillis end |
#win/loose ⇒ String
history as a string. Each character shows a (W)in, (L)oss or (N)ot played
64 65 66 |
# File 'lib/sightstone/league.rb', line 64
def win/loose
@win/loose
end
|
#wins ⇒ Fixnum
number of won games of the series
64 65 66 |
# File 'lib/sightstone/league.rb', line 64 def wins @wins end |