Class: IMDB::Person

Inherits:
Skeleton show all
Defined in:
lib/imdb/person.rb

Instance Attribute Summary

Attributes inherited from Skeleton

#method_names, #model

Instance Method Summary collapse

Methods inherited from Skeleton

json_create, #to_hash, #to_json

Constructor Details

#initialize(imdb_id, name, char, profile, picture) ⇒ Person

Returns a new instance of Person.



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/imdb/person.rb', line 3

def initialize(imdb_id, name, char, profile, picture)
  super("Person",{:imdb_id => String,
        :name => String,
        :char => String,
        :profile => String,
        :picture => String}, [:imdb_id, :profile])
  @imdb_id = imdb_id
  @name = name
  @char = char
  @profile = profile
  @picture = picture
end

Instance Method Details

#charObject



24
25
26
# File 'lib/imdb/person.rb', line 24

def char
  @char
end

#imdb_idObject



16
17
18
# File 'lib/imdb/person.rb', line 16

def imdb_id
  @imdb_id
end

#nameObject



20
21
22
# File 'lib/imdb/person.rb', line 20

def name
  @name
end

#pictureObject



32
33
34
# File 'lib/imdb/person.rb', line 32

def picture
  @picture
end

#profileObject



28
29
30
# File 'lib/imdb/person.rb', line 28

def profile
  @profile
end

#to_sObject



36
37
38
# File 'lib/imdb/person.rb', line 36

def to_s
  "Name: #{@name} \n Char: #{@char} \n"
end