Class: ImdbParty::Person

Inherits:
Object
  • Object
show all
Defined in:
lib/imdb_party/person.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Person

Returns a new instance of Person.



5
6
7
8
9
10
# File 'lib/imdb_party/person.rb', line 5

def initialize(options={})
  @name = options["name"]["name"]
  @imdb_id = options["name"]["nconst"]
  
  @role = options["char"] if options["char"]
end

Instance Attribute Details

#imdb_idObject

Returns the value of attribute imdb_id.



3
4
5
# File 'lib/imdb_party/person.rb', line 3

def imdb_id
  @imdb_id
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/imdb_party/person.rb', line 3

def name
  @name
end

#roleObject

Returns the value of attribute role.



3
4
5
# File 'lib/imdb_party/person.rb', line 3

def role
  @role
end