class Spreader::Stats

The Stats class spreads the json response into different methods

Attributes

obj[R]

Returns raw Hash of the response

Public Class Methods

new(obj) click to toggle source

Initializes the Stats class @param obj [Object] Response Hash

# File lib/topgg/stats.rb, line 6
def initialize(obj)
  @obj = obj
end

Public Instance Methods

server_count() click to toggle source

Returns the server Count of the bot @return [Integer]

# File lib/topgg/stats.rb, line 15
def server_count
  @obj['server_count']
end
shard_count() click to toggle source

Returns the total number of shards @return [Integer]

# File lib/topgg/stats.rb, line 27
def shard_count
  @obj['shard_count']
end
shards() click to toggle source

The amount of servers per shard @return [Integer]

# File lib/topgg/stats.rb, line 21
def shards
  @obj['shards']
end