class LolApi::Match

Public Instance Methods

blue_team() click to toggle source
# File lib/lol_api/types/match.rb, line 25
def blue_team 
        [ teams[0], participants.select { |x| x.team_id == 100 } ]
end
match_mode() click to toggle source
# File lib/lol_api/types/match.rb, line 11
def match_mode
        raw_match['matchMode']
end
match_type() click to toggle source
# File lib/lol_api/types/match.rb, line 7
def match_type
        raw_match['matchType']
end
purple_team() click to toggle source
# File lib/lol_api/types/match.rb, line 29
def purple_team
        [ teams[1], participants.select { |x| x.team_id == 200 } ]
end
teams() click to toggle source
# File lib/lol_api/types/match.rb, line 15
def teams
        if teams = raw_match['teams']
                teams.map { |e| Team.new(e) }
        end
end
timeline() click to toggle source
# File lib/lol_api/types/match.rb, line 21
def timeline
        Timeline.new(raw_match['timeline'])
end
ward_placements() click to toggle source
# File lib/lol_api/types/match.rb, line 33
def ward_placements
        timeline.frames.map do |f|
                f.events.select do |e|
                        e.event_type == "WARD_PLACED"
                end
        end.flatten
end