Class: WebRTC::RTCStatsReport
- Inherits:
-
Object
- Object
- WebRTC::RTCStatsReport
- Includes:
- Enumerable
- Defined in:
- lib/webrtc/stats_report.rb
Instance Method Summary collapse
- #[](id) ⇒ Object
- #each(&block) ⇒ Object
- #get(id) ⇒ Object
- #has?(id) ⇒ Boolean
-
#initialize(stats = {}) ⇒ RTCStatsReport
constructor
A new instance of RTCStatsReport.
- #keys ⇒ Object
- #size ⇒ Object
- #to_h ⇒ Object
- #values ⇒ Object
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
35 36 37 |
# File 'lib/webrtc/stats_report.rb', line 35 def has?(id) @stats.key?(id) end |
#keys ⇒ Object
23 24 25 |
# File 'lib/webrtc/stats_report.rb', line 23 def keys @stats.keys end |
#size ⇒ Object
19 20 21 |
# File 'lib/webrtc/stats_report.rb', line 19 def size @stats.size end |
#to_h ⇒ Object
39 40 41 |
# File 'lib/webrtc/stats_report.rb', line 39 def to_h @stats.dup end |
#values ⇒ Object
27 28 29 |
# File 'lib/webrtc/stats_report.rb', line 27 def values @stats.values end |