lib/lol/match_request.rb
def recent_matches(match_list)
      match_list['matches'] = match_list['matches'].sort_by { |m| m['timestamp'].to_i }.last(20)
      match_list['totalGames'] = match_list['matches'].size
      match_list
    end
# filter last 20 matches given a match list
filter last 20 matches given a match list
filter last 20 matches given a match list
def recent_matches(match_list)
      match_list['matches'] = match_list['matches'].sort_by { |m| m['timestamp'].to_i }.last(20)
      match_list['totalGames'] = match_list['matches'].size
      match_list
    end
def recent_matches ( match_list ) match_list [ 'matches' ] = match_list [ 'matches' ] . sort_by { | m | m [ 'timestamp' ] . to_i } . last ( 20 ) match_list [ 'totalGames' ] = match_list [ 'matches' ] . size match_list end
filter last 20 matches given a match list
filter last 20 matches given a match list
match_list