Class: WebRTC::DataChannelMessage
- Inherits:
-
Object
- Object
- WebRTC::DataChannelMessage
- Defined in:
- lib/webrtc/parity_types.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #binary? ⇒ Boolean
-
#initialize(data, is_binary) ⇒ DataChannelMessage
constructor
A new instance of DataChannelMessage.
- #text? ⇒ Boolean
Constructor Details
#initialize(data, is_binary) ⇒ DataChannelMessage
Returns a new instance of DataChannelMessage.
216 217 218 219 |
# File 'lib/webrtc/parity_types.rb', line 216 def initialize(data, is_binary) @data = data @is_binary = is_binary end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
214 215 216 |
# File 'lib/webrtc/parity_types.rb', line 214 def data @data end |
Instance Method Details
#binary? ⇒ Boolean
221 222 223 |
# File 'lib/webrtc/parity_types.rb', line 221 def binary? @is_binary end |
#text? ⇒ Boolean
225 226 227 |
# File 'lib/webrtc/parity_types.rb', line 225 def text? !@is_binary end |