Class: Marver::Character
- Inherits:
-
Object
- Object
- Marver::Character
- Defined in:
- lib/marver/entities/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.
-
#full_path ⇒ Object
readonly
Returns the value of attribute full_path.
-
#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.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/marver/entities/character.rb', line 8 def initialize(args) @series = args[:series] @stories = args[:stories] @events = args[:events] @comics = args[:comics] @urls = args[:urls] @thumbnail = args[:thumbnail] args[:attributes].each do |name, value| instance_variable_set("@#{name}", value) end end |
Instance Attribute Details
#comics ⇒ Object (readonly)
Returns the value of attribute comics.
5 6 7 |
# File 'lib/marver/entities/character.rb', line 5 def comics @comics end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
5 6 7 |
# File 'lib/marver/entities/character.rb', line 5 def description @description end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
5 6 7 |
# File 'lib/marver/entities/character.rb', line 5 def events @events end |
#full_path ⇒ Object (readonly)
Returns the value of attribute full_path.
5 6 7 |
# File 'lib/marver/entities/character.rb', line 5 def full_path @full_path end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/marver/entities/character.rb', line 5 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/marver/entities/character.rb', line 5 def name @name end |
#resource_uri ⇒ Object (readonly)
Returns the value of attribute resource_uri.
5 6 7 |
# File 'lib/marver/entities/character.rb', line 5 def resource_uri @resource_uri end |
#series ⇒ Object (readonly)
Returns the value of attribute series.
5 6 7 |
# File 'lib/marver/entities/character.rb', line 5 def series @series end |
#stories ⇒ Object (readonly)
Returns the value of attribute stories.
5 6 7 |
# File 'lib/marver/entities/character.rb', line 5 def stories @stories end |
#thumbnail ⇒ Object (readonly)
Returns the value of attribute thumbnail.
5 6 7 |
# File 'lib/marver/entities/character.rb', line 5 def thumbnail @thumbnail end |
#urls ⇒ Object (readonly)
Returns the value of attribute urls.
5 6 7 |
# File 'lib/marver/entities/character.rb', line 5 def urls @urls end |