Class: OpenTok::Stream
- Inherits:
-
Object
- Object
- OpenTok::Stream
- Defined in:
- lib/opentok/stream.rb
Instance Attribute Summary collapse
-
#layoutClassList ⇒ array
An array of the layout classes for the stream.
-
#videoType ⇒ string
The videoType property is either “camera” or “screen”.
Instance Method Summary collapse
-
#to_json ⇒ Object
A JSON-encoded string representation of the stream.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/opentok/stream.rb', line 32 def method_missing(method, *args, &block) camelized_method = method.to_s.camelize(:lower) if @json.has_key? camelized_method and args.empty? # TODO: convert create_time method call to a Time object if camelized_method == 'outputMode' @json[camelized_method].to_sym else @json[camelized_method] end else super method, *args, &block end end |
Instance Attribute Details
#layoutClassList ⇒ array
An array of the layout classes for the stream.
17 18 19 |
# File 'lib/opentok/stream.rb', line 17 def layoutClassList @layoutClassList end |
#videoType ⇒ string
The videoType property is either “camera” or “screen”.
17 18 19 |
# File 'lib/opentok/stream.rb', line 17 def videoType @videoType end |
Instance Method Details
#to_json ⇒ Object
A JSON-encoded string representation of the stream.
26 27 28 |
# File 'lib/opentok/stream.rb', line 26 def to_json @json.to_json end |