We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2ddc06 commit a6fbc75Copy full SHA for a6fbc75
lib/esdb/match.rb
@@ -1,5 +1,14 @@
1
module ESDB
2
class Match < ESDB::Resource
3
+ # Combines all entities into a hash keys with the team number
4
+ def teams
5
+ entities.inject({}){|teams, entity|
6
+ teams[entity['team']] ||= []
7
+ teams[entity['team']] << entity
8
+ teams
9
+ }
10
+ end
11
+
12
def duration_minutes
13
return (duration_seconds / 60.0).round
14
end
0 commit comments