class PUBG::Player

Public Class Methods

new(args, s=false) click to toggle source
# File lib/pubg/player.rb, line 8
def initialize(args, s=false)
        @s = s
        @args = args
end

Public Instance Methods

data() click to toggle source
# File lib/pubg/player.rb, line 17
  def data
          if @s
                  data = []
@args["data"].each do |player|
  data << Data.new(player)
end
return data
          else
                  Data.new(@args["data"])
          end
  end
matches() click to toggle source
# File lib/pubg/player.rb, line 45
    def matches
            matches = []
            @args["data"]["relationships"]["matches"]["data"].each do |match|
  matches << Matches.new(match)
end
return matches
    end
meta() click to toggle source
# File lib/pubg/player.rb, line 33
def meta
        @args["meta"]
end
original() click to toggle source
# File lib/pubg/player.rb, line 13
def original
        @args
end
player() click to toggle source
# File lib/pubg/player.rb, line 37
def player
        Data::Attributes.new(@args["data"]["attributes"])
end
playerId() click to toggle source
# File lib/pubg/player.rb, line 41
def playerId
        @args["data"]["id"]
end
season(season_id=nil, platform_region=$platform_region) click to toggle source
# File lib/pubg/player.rb, line 53
def season(season_id=nil, platform_region=$platform_region)
        Season.new(platform_region, @args["data"]["id"], season_id)
end