Class: TvdbPartyV2::Actor

Inherits:
Object
  • Object
show all
Defined in:
lib/tvdb_party_v2/actor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options = {})
  @id = options["id"]
  @name = options["name"]
  @role = options["role"] if options["role"]
  @image = options["image"] if options["image"]
  @sortorder = options["sortOrder"] if options["sortOrder"]
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/tvdb_party_v2/actor.rb', line 3

def id
  @id
end

#imageObject

Returns the value of attribute image.



3
4
5
# File 'lib/tvdb_party_v2/actor.rb', line 3

def image
  @image
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/tvdb_party_v2/actor.rb', line 3

def name
  @name
end

#roleObject

Returns the value of attribute role.



3
4
5
# File 'lib/tvdb_party_v2/actor.rb', line 3

def role
  @role
end

#sortorderObject

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_urlObject



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