Class: Plex::Role
- Inherits:
-
Object
- Object
- Plex::Role
- Defined in:
- lib/plex-ruby/tags.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(node) ⇒ Role
constructor
A new instance of Role.
Constructor Details
#initialize(node) ⇒ Role
Returns a new instance of Role.
31 32 33 34 35 |
# File 'lib/plex-ruby/tags.rb', line 31 def initialize(node) @id = node.attr('id') @tag = node.attr('tag') @role = node.attr('role') end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
29 30 31 |
# File 'lib/plex-ruby/tags.rb', line 29 def id @id end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
29 30 31 |
# File 'lib/plex-ruby/tags.rb', line 29 def role @role end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
29 30 31 |
# File 'lib/plex-ruby/tags.rb', line 29 def tag @tag end |
Instance Method Details
#==(other) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/plex-ruby/tags.rb', line 37 def ==(other) if other.is_a? Role id == other.id else super end end |