Class: Plex::Stream
- Inherits:
-
Object
- Object
- Plex::Stream
- Defined in:
- lib/plex-ruby/stream.rb
Constant Summary collapse
- ATTRIBUTES =
%w(id streamType codec index language languageCode)
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(node) ⇒ Stream
constructor
A new instance of Stream.
Constructor Details
#initialize(node) ⇒ Stream
Returns a new instance of Stream.
8 9 10 11 12 13 14 |
# File 'lib/plex-ruby/stream.rb', line 8 def initialize(node) node.attributes.each do |method, val| define_singleton_method(Plex.underscore(method).to_sym) do val.value end end end |
Instance Method Details
#==(other) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/plex-ruby/stream.rb', line 16 def ==(other) if other.is_a? Plex::Stream id == other.id else super end end |