Class: QuakeliveApi::GameTime::Interval

Inherits:
Struct
  • Object
show all
Defined in:
lib/quakelive_api/game_time.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#daysObject

Returns the value of attribute days

Returns:

  • (Object)

    the current value of days



5
6
7
# File 'lib/quakelive_api/game_time.rb', line 5

def days
  @days
end

#hoursObject

Returns the value of attribute hours

Returns:

  • (Object)

    the current value of hours



5
6
7
# File 'lib/quakelive_api/game_time.rb', line 5

def hours
  @hours
end

#minutesObject

Returns the value of attribute minutes

Returns:

  • (Object)

    the current value of minutes



5
6
7
# File 'lib/quakelive_api/game_time.rb', line 5

def minutes
  @minutes
end

#secondsObject

Returns the value of attribute seconds

Returns:

  • (Object)

    the current value of seconds



5
6
7
# File 'lib/quakelive_api/game_time.rb', line 5

def seconds
  @seconds
end

Instance Method Details

#totalObject



6
7
8
# File 'lib/quakelive_api/game_time.rb', line 6

def total
  members.sum { |m| send(m).send(m) } # see what I did there?
end