Class: LeagueOfLegends::DTO::Roster

Inherits:
Object
  • Object
show all
Defined in:
lib/league_of_legends/dto/roster.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Roster



11
12
13
14
15
16
17
18
# File 'lib/league_of_legends/dto/roster.rb', line 11

def initialize attributes
  return if attributes.nil?

  @owner_id = attributes[:ownerId]
  @member_list = attributes[:memberList].map do |member|
    ::LeagueOfLegends::DTO::TeamMemberInfo.new(member)
  end
end

Instance Attribute Details

#member_listObject (readonly)

Returns the value of attribute member_list.



9
10
11
# File 'lib/league_of_legends/dto/roster.rb', line 9

def member_list
  @member_list
end

#owner_idObject (readonly)

Returns the value of attribute owner_id.



9
10
11
# File 'lib/league_of_legends/dto/roster.rb', line 9

def owner_id
  @owner_id
end

Class Method Details

.versionObject



5
6
7
# File 'lib/league_of_legends/dto/roster.rb', line 5

def self.version
  ::LeagueOfLegends::DTO::Team.version
end