Class: Thanos::Character

Inherits:
Object
  • Object
show all
Defined in:
lib/thanos/resources/character.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#comicsObject (readonly)

Returns the value of attribute comics.



3
4
5
# File 'lib/thanos/resources/character.rb', line 3

def comics
  @comics
end

#descriptionObject (readonly)

Returns the value of attribute description.



3
4
5
# File 'lib/thanos/resources/character.rb', line 3

def description
  @description
end

#eventsObject (readonly)

Returns the value of attribute events.



3
4
5
# File 'lib/thanos/resources/character.rb', line 3

def events
  @events
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/thanos/resources/character.rb', line 3

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/thanos/resources/character.rb', line 3

def name
  @name
end

#resource_uriObject (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

#seriesObject (readonly)

Returns the value of attribute series.



3
4
5
# File 'lib/thanos/resources/character.rb', line 3

def series
  @series
end

#storiesObject (readonly)

Returns the value of attribute stories.



3
4
5
# File 'lib/thanos/resources/character.rb', line 3

def stories
  @stories
end

#thumbnailObject (readonly)

Returns the value of attribute thumbnail.



3
4
5
# File 'lib/thanos/resources/character.rb', line 3

def thumbnail
  @thumbnail
end

#urlsObject (readonly)

Returns the value of attribute urls.



3
4
5
# File 'lib/thanos/resources/character.rb', line 3

def urls
  @urls
end