Class: Sightstone::MiniSeries

Inherits:
Object
  • Object
show all
Defined in:
lib/sightstone/league.rb

Overview

Class to represent a MiniSeries (Promotion games)

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#lossesFixnum

number of lost games of the series

Returns:

  • (Fixnum)

    the current value of losses



64
65
66
# File 'lib/sightstone/league.rb', line 64

def losses
  @losses
end

#progressObject

Returns the value of attribute progress.



65
66
67
# File 'lib/sightstone/league.rb', line 65

def progress
  @progress
end

#targetFixnum

number of required wins to win the series

Returns:

  • (Fixnum)

    the current value of target



64
65
66
# File 'lib/sightstone/league.rb', line 64

def target
  @target
end

#timeLeftToPlayMillisFixnum

time left to complete the series

Returns:

  • (Fixnum)

    the current value of timeLeftToPlayMillis



64
65
66
# File 'lib/sightstone/league.rb', line 64

def timeLeftToPlayMillis
  @timeLeftToPlayMillis
end

#win/looseString

history as a string. Each character shows a (W)in, (L)oss or (N)ot played

Returns:

  • (String)

    the current value of win/loose



64
65
66
# File 'lib/sightstone/league.rb', line 64

def win/loose
  @win/loose
end

#winsFixnum

number of won games of the series

Returns:

  • (Fixnum)

    the current value of wins



64
65
66
# File 'lib/sightstone/league.rb', line 64

def wins
  @wins
end