Class: WebRTC::RTCStatsReport

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/webrtc/stats_report.rb

Instance Method Summary collapse

Constructor Details

#initialize(stats = {}) ⇒ RTCStatsReport

Returns a new instance of RTCStatsReport.



7
8
9
# File 'lib/webrtc/stats_report.rb', line 7

def initialize(stats = {})
  @stats = stats
end

Instance Method Details

#[](id) ⇒ Object



11
12
13
# File 'lib/webrtc/stats_report.rb', line 11

def [](id)
  @stats[id]
end

#each(&block) ⇒ Object



15
16
17
# File 'lib/webrtc/stats_report.rb', line 15

def each(&block)
  @stats.each(&block)
end

#get(id) ⇒ Object



31
32
33
# File 'lib/webrtc/stats_report.rb', line 31

def get(id)
  @stats[id]
end

#has?(id) ⇒ Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/webrtc/stats_report.rb', line 35

def has?(id)
  @stats.key?(id)
end

#keysObject



23
24
25
# File 'lib/webrtc/stats_report.rb', line 23

def keys
  @stats.keys
end

#sizeObject



19
20
21
# File 'lib/webrtc/stats_report.rb', line 19

def size
  @stats.size
end

#to_hObject



39
40
41
# File 'lib/webrtc/stats_report.rb', line 39

def to_h
  @stats.dup
end

#valuesObject



27
28
29
# File 'lib/webrtc/stats_report.rb', line 27

def values
  @stats.values
end