Class: WebRTC::RTCIceServer
- Inherits:
-
Object
- Object
- WebRTC::RTCIceServer
- Defined in:
- lib/webrtc/configuration.rb
Instance Attribute Summary collapse
-
#credential ⇒ Object
Returns the value of attribute credential.
-
#credential_type ⇒ Object
Returns the value of attribute credential_type.
-
#urls ⇒ Object
Returns the value of attribute urls.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ RTCIceServer
constructor
A new instance of RTCIceServer.
- #to_h ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ RTCIceServer
Returns a new instance of RTCIceServer.
59 60 61 62 63 64 65 66 |
# File 'lib/webrtc/configuration.rb', line 59 def initialize( = {}) @urls = normalize_urls([:urls] || [:url]) @username = [:username] @credential = [:credential] @credential_type = [:credential_type] || [:credentialType] || :password validate! end |
Instance Attribute Details
#credential ⇒ Object
Returns the value of attribute credential.
57 58 59 |
# File 'lib/webrtc/configuration.rb', line 57 def credential @credential end |
#credential_type ⇒ Object
Returns the value of attribute credential_type.
57 58 59 |
# File 'lib/webrtc/configuration.rb', line 57 def credential_type @credential_type end |
#urls ⇒ Object
Returns the value of attribute urls.
57 58 59 |
# File 'lib/webrtc/configuration.rb', line 57 def urls @urls end |
#username ⇒ Object
Returns the value of attribute username.
57 58 59 |
# File 'lib/webrtc/configuration.rb', line 57 def username @username end |
Instance Method Details
#to_h ⇒ Object
68 69 70 71 72 73 74 |
# File 'lib/webrtc/configuration.rb', line 68 def to_h hash = { urls: @urls } hash[:username] = @username if @username hash[:credential] = @credential if @credential hash[:credentialType] = @credential_type if @credential hash end |