class OpenTok::Stream
@attr [string] videoType
The videoType property is either "camera" or "screen".
@attr [array] layoutClassList
An array of the layout classes for the stream.
Public Class Methods
new(json)
click to toggle source
@private
# File lib/opentok/stream.rb, line 20 def initialize(json) # TODO: validate json fits schema @json = json end
Public Instance Methods
method_missing(method, *args, &block)
click to toggle source
@private ignore
Calls superclass method
# 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
to_json()
click to toggle source
A JSON-encoded string representation of the stream.
# File lib/opentok/stream.rb, line 26 def to_json @json.to_json end