Class: P3::Tvdb::Actor
- Inherits:
-
Object
- Object
- P3::Tvdb::Actor
- Defined in:
- lib/p3-tvdb/actor.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#image ⇒ Object
Returns the value of attribute image.
-
#name ⇒ Object
Returns the value of attribute name.
-
#role ⇒ Object
Returns the value of attribute role.
Instance Method Summary collapse
- #image_url ⇒ Object
-
#initialize(options = {}) ⇒ Actor
constructor
A new instance of Actor.
Constructor Details
#initialize(options = {}) ⇒ Actor
Returns a new instance of Actor.
6 7 8 9 10 11 |
# File 'lib/p3-tvdb/actor.rb', line 6 def initialize(={}) @id = ["id"] @name = ["Name"] @role = ["Role"] @image = ["Image"] end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/p3-tvdb/actor.rb', line 4 def id @id end |
#image ⇒ Object
Returns the value of attribute image.
4 5 6 |
# File 'lib/p3-tvdb/actor.rb', line 4 def image @image end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/p3-tvdb/actor.rb', line 4 def name @name end |
#role ⇒ Object
Returns the value of attribute role.
4 5 6 |
# File 'lib/p3-tvdb/actor.rb', line 4 def role @role end |
Instance Method Details
#image_url ⇒ Object
13 14 15 16 |
# File 'lib/p3-tvdb/actor.rb', line 13 def image_url return nil unless @image "http://thetvdb.com/banners/" + @image end |