Class: PUBG::Match::Roster::Relationships
- Inherits:
-
Object
- Object
- PUBG::Match::Roster::Relationships
- Defined in:
- lib/pubg/match/roster/relationships.rb
Defined Under Namespace
Classes: Participants
Instance Attribute Summary collapse
-
#participants ⇒ Object
readonly
Returns the value of attribute participants.
-
#team ⇒ Object
readonly
Returns the value of attribute team.
Instance Method Summary collapse
- #get_participants ⇒ Object
-
#initialize(args) ⇒ Relationships
constructor
A new instance of Relationships.
Constructor Details
#initialize(args) ⇒ Relationships
Returns a new instance of Relationships.
7 8 9 10 11 12 |
# File 'lib/pubg/match/roster/relationships.rb', line 7 def initialize(args) @args = args @team = args["team"]["data"] @participants = Array.new get_participants end |
Instance Attribute Details
#participants ⇒ Object (readonly)
Returns the value of attribute participants.
5 6 7 |
# File 'lib/pubg/match/roster/relationships.rb', line 5 def participants @participants end |
#team ⇒ Object (readonly)
Returns the value of attribute team.
5 6 7 |
# File 'lib/pubg/match/roster/relationships.rb', line 5 def team @team end |
Instance Method Details
#get_participants ⇒ Object
14 15 16 17 18 |
# File 'lib/pubg/match/roster/relationships.rb', line 14 def get_participants @args["participants"]["data"].each do |participant| @participants << Participants.new(participant) end end |