Class: Thanos::Character
- Inherits:
-
Object
- Object
- Thanos::Character
- Defined in:
- lib/thanos/resources/character.rb
Instance Attribute Summary collapse
-
#comics ⇒ Object
readonly
Returns the value of attribute comics.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#events ⇒ Object
readonly
Returns the value of attribute events.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#resource_uri ⇒ Object
readonly
Returns the value of attribute resource_uri.
-
#series ⇒ Object
readonly
Returns the value of attribute series.
-
#stories ⇒ Object
readonly
Returns the value of attribute stories.
-
#thumbnail ⇒ Object
readonly
Returns the value of attribute thumbnail.
-
#urls ⇒ Object
readonly
Returns the value of attribute urls.
Instance Method Summary collapse
-
#initialize(args) ⇒ Character
constructor
A new instance of Character.
Constructor Details
#initialize(args) ⇒ Character
Returns a new instance of Character.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/thanos/resources/character.rb', line 6 def initialize(args) @comics = args[:comics] @series = args[:series] @events = args[:events] @stories = args[:stories] @urls = args[:urls] @thumbnail = args[:thumbnail] args[:attributes].each do |attribute, value| instance_variable_set("@#{attribute}", value) end end |
Instance Attribute Details
#comics ⇒ Object (readonly)
Returns the value of attribute comics.
3 4 5 |
# File 'lib/thanos/resources/character.rb', line 3 def comics @comics end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/thanos/resources/character.rb', line 3 def description @description end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
3 4 5 |
# File 'lib/thanos/resources/character.rb', line 3 def events @events end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/thanos/resources/character.rb', line 3 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/thanos/resources/character.rb', line 3 def name @name end |
#resource_uri ⇒ Object (readonly)
Returns the value of attribute resource_uri.
3 4 5 |
# File 'lib/thanos/resources/character.rb', line 3 def resource_uri @resource_uri end |
#series ⇒ Object (readonly)
Returns the value of attribute series.
3 4 5 |
# File 'lib/thanos/resources/character.rb', line 3 def series @series end |
#stories ⇒ Object (readonly)
Returns the value of attribute stories.
3 4 5 |
# File 'lib/thanos/resources/character.rb', line 3 def stories @stories end |
#thumbnail ⇒ Object (readonly)
Returns the value of attribute thumbnail.
3 4 5 |
# File 'lib/thanos/resources/character.rb', line 3 def thumbnail @thumbnail end |
#urls ⇒ Object (readonly)
Returns the value of attribute urls.
3 4 5 |
# File 'lib/thanos/resources/character.rb', line 3 def urls @urls end |