class PUBG::Match
Public Class Methods
new(args)
click to toggle source
# File lib/pubg/match.rb, line 7 def initialize(args) @args = args end
Public Instance Methods
data()
click to toggle source
# File lib/pubg/match.rb, line 11 def data @args["data"] end
included()
click to toggle source
# File lib/pubg/match.rb, line 15 def included @args["included"] end
links()
click to toggle source
# File lib/pubg/match.rb, line 19 def links @args["links"] end
meta()
click to toggle source
# File lib/pubg/match.rb, line 23 def meta @args["meta"] end
participants()
click to toggle source
# File lib/pubg/match.rb, line 31 def participants items = [] participants = @args["included"].select {|data| data["type"] == "participant" } participants.each do |participant| items << Participants.new(participant) end return items end
roster()
click to toggle source
# File lib/pubg/match.rb, line 40 def roster items = [] rosters = @args["included"].select {|data| data["type"] == "roster" } rosters.each do |roster| items << Roster.new(roster) end return items end
telemetry()
click to toggle source
# File lib/pubg/match.rb, line 27 def telemetry Telemetry.new(@args["included"].select {|data| data["type"] == "asset" }.first) end