Class: TvdbPartyV2::Actor
- Inherits:
-
Object
- Object
- TvdbPartyV2::Actor
- Defined in:
- lib/tvdb_party_v2/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.
-
#sortorder ⇒ Object
Returns the value of attribute sortorder.
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.
5 6 7 8 9 10 11 |
# File 'lib/tvdb_party_v2/actor.rb', line 5 def initialize( = {}) @id = ["id"] @name = ["name"] @role = ["role"] if ["role"] @image = ["image"] if ["image"] @sortorder = ["sortOrder"] if ["sortOrder"] end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/tvdb_party_v2/actor.rb', line 3 def id @id end |
#image ⇒ Object
Returns the value of attribute image.
3 4 5 |
# File 'lib/tvdb_party_v2/actor.rb', line 3 def image @image end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/tvdb_party_v2/actor.rb', line 3 def name @name end |
#role ⇒ Object
Returns the value of attribute role.
3 4 5 |
# File 'lib/tvdb_party_v2/actor.rb', line 3 def role @role end |
#sortorder ⇒ Object
Returns the value of attribute sortorder.
3 4 5 |
# File 'lib/tvdb_party_v2/actor.rb', line 3 def sortorder @sortorder end |
Instance Method Details
#image_url ⇒ Object
13 14 15 16 |
# File 'lib/tvdb_party_v2/actor.rb', line 13 def image_url return nil unless @image "http://www.thetvdb.com/banners/" + @image end |