Class: Plex::Role

Inherits:
Object
  • Object
show all
Defined in:
lib/plex-ruby/tags.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject (readonly)

Returns the value of attribute id.



29
30
31
# File 'lib/plex-ruby/tags.rb', line 29

def id
  @id
end

#roleObject (readonly)

Returns the value of attribute role.



29
30
31
# File 'lib/plex-ruby/tags.rb', line 29

def role
  @role
end

#tagObject (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