Class: TomatoPower::Actor
- Inherits:
-
Object
- Object
- TomatoPower::Actor
- Defined in:
- lib/tomato_power/movie/actor.rb
Overview
Actor of a movie.
Instance Attribute Summary collapse
-
#characters ⇒ Object
readonly
Returns the value of attribute characters.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(actor = {}) ⇒ Actor
constructor
A new instance of Actor.
Constructor Details
#initialize(actor = {}) ⇒ Actor
Returns a new instance of Actor.
7 8 9 10 11 |
# File 'lib/tomato_power/movie/actor.rb', line 7 def initialize actor={} @id = actor["id"] @name = actor["name"] @characters = actor["characters"] end |
Instance Attribute Details
#characters ⇒ Object (readonly)
Returns the value of attribute characters.
5 6 7 |
# File 'lib/tomato_power/movie/actor.rb', line 5 def characters @characters end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/tomato_power/movie/actor.rb', line 5 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/tomato_power/movie/actor.rb', line 5 def name @name end |