Class: WebRTC::MessageEvent
- Inherits:
-
Object
- Object
- WebRTC::MessageEvent
- Defined in:
- lib/webrtc/data_channel.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#last_event_id ⇒ Object
readonly
Returns the value of attribute last_event_id.
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
Instance Method Summary collapse
- #binary? ⇒ Boolean
-
#initialize(data, is_binary) ⇒ MessageEvent
constructor
A new instance of MessageEvent.
- #text? ⇒ Boolean
Constructor Details
#initialize(data, is_binary) ⇒ MessageEvent
Returns a new instance of MessageEvent.
201 202 203 204 205 206 |
# File 'lib/webrtc/data_channel.rb', line 201 def initialize(data, is_binary) @data = data @is_binary = is_binary @origin = '' @last_event_id = '' end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
199 200 201 |
# File 'lib/webrtc/data_channel.rb', line 199 def data @data end |
#last_event_id ⇒ Object (readonly)
Returns the value of attribute last_event_id.
199 200 201 |
# File 'lib/webrtc/data_channel.rb', line 199 def last_event_id @last_event_id end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
199 200 201 |
# File 'lib/webrtc/data_channel.rb', line 199 def origin @origin end |
Instance Method Details
#binary? ⇒ Boolean
208 209 210 |
# File 'lib/webrtc/data_channel.rb', line 208 def binary? @is_binary end |
#text? ⇒ Boolean
212 213 214 |
# File 'lib/webrtc/data_channel.rb', line 212 def text? !@is_binary end |