Class: PUBG::Player::Season::Data::Relationships

Inherits:
Object
  • Object
show all
Defined in:
lib/pubg/player/season/data/relationships.rb,
lib/pubg/player/season/data/relationships/player.rb,
lib/pubg/player/season/data/relationships/season.rb,
lib/pubg/player/season/data/relationships/matches.rb

Defined Under Namespace

Classes: Matches, Player, Season

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Relationships

Returns a new instance of Relationships.



10
11
12
# File 'lib/pubg/player/season/data/relationships.rb', line 10

def initialize(args)
  @args = args
end

Instance Method Details

#matchesDuoObject



26
27
28
# File 'lib/pubg/player/season/data/relationships.rb', line 26

def matchesDuo
  matchStyle(@args["matchesDuo"]["data"])
end

#matchesDuoFPPObject



38
39
40
# File 'lib/pubg/player/season/data/relationships.rb', line 38

def matchesDuoFPP
  matchStyle(@args["matchesDuoFPP"]["data"])
end

#matchesSoloObject



22
23
24
# File 'lib/pubg/player/season/data/relationships.rb', line 22

def matchesSolo
  matchStyle(@args["matchesSolo"]["data"])
end

#matchesSoloFPPObject



34
35
36
# File 'lib/pubg/player/season/data/relationships.rb', line 34

def matchesSoloFPP
  matchStyle(@args["matchesSoloFPP"]["data"])
end

#matchesSquadObject



30
31
32
# File 'lib/pubg/player/season/data/relationships.rb', line 30

def matchesSquad
  matchStyle(@args["matchesSquad"]["data"])
end

#matchesSquadFPPObject



42
43
44
# File 'lib/pubg/player/season/data/relationships.rb', line 42

def matchesSquadFPP
  matchStyle(@args["matchesSquadFPP"]["data"])
end

#matchStyle(data) ⇒ Object



46
47
48
49
50
51
52
# File 'lib/pubg/player/season/data/relationships.rb', line 46

def matchStyle(data)
  i = []
  data.each do |item|
    i << Matches.new(item)
  end
  i
end

#playerObject



14
15
16
# File 'lib/pubg/player/season/data/relationships.rb', line 14

def player
  Player.new(@args["player"])
end

#seasonObject



18
19
20
# File 'lib/pubg/player/season/data/relationships.rb', line 18

def season
  Season.new(@args["season"])
end