class Brawlstars::Player

Public Class Methods

new(client, data) click to toggle source
# File lib/brawlstars.rb, line 186
def initialize(client, data)
  @client = client
  @data = data
end

Public Instance Methods

getBattleLog() click to toggle source
# File lib/brawlstars.rb, line 207
def getBattleLog
  @client.getBattleLog(@data["tag"])
end
getClub() click to toggle source
# File lib/brawlstars.rb, line 199
def getClub
  if !@data["club"]
    nil
  else
    @client.getClub(@data["club"]["tag"])
  end
end
method_missing(name, *args, &block) click to toggle source
Calls superclass method
# File lib/brawlstars.rb, line 191
def method_missing(name, *args, &block)
  if @data.respond_to?(name)
    @data.send(name, *args, &block)
  else
    super
  end
end
to_s() click to toggle source
# File lib/brawlstars.rb, line 211
def to_s
  "#{@data}"
end