Class: Thanos::Series

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Series

Returns a new instance of Series.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/thanos/resources/series.rb', line 7

def initialize(args)
  @stories = args[:stories]
  @events = args[:events]
  @creators = args[:creators]
  @characters = args[:characters]
  @comics = args[:comics]
  @urls = args[:urls]
  @thumbnail = args[:thumbnail]
  @next = args[:next_series]
  @previous = args[:previous_series]

  args[:attributes].each do |attribute, value|
    instance_variable_set("@#{attribute}", value)
  end
end

Instance Attribute Details

#charactersObject (readonly)

Returns the value of attribute characters.



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

def characters
  @characters
end

#comicsObject (readonly)

Returns the value of attribute comics.



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

def comics
  @comics
end

#creatorsObject (readonly)

Returns the value of attribute creators.



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

def creators
  @creators
end

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#end_yearObject (readonly)

Returns the value of attribute end_year.



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

def end_year
  @end_year
end

#eventsObject (readonly)

Returns the value of attribute events.



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

def events
  @events
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#nextObject (readonly)

Returns the value of attribute next.



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

def next
  @next
end

#previousObject (readonly)

Returns the value of attribute previous.



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

def previous
  @previous
end

#ratingObject (readonly)

Returns the value of attribute rating.



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

def rating
  @rating
end

#resource_uriObject (readonly)

Returns the value of attribute resource_uri.



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

def resource_uri
  @resource_uri
end

#start_yearObject (readonly)

Returns the value of attribute start_year.



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

def start_year
  @start_year
end

#storiesObject (readonly)

Returns the value of attribute stories.



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

def stories
  @stories
end

#thumbnailObject (readonly)

Returns the value of attribute thumbnail.



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

def thumbnail
  @thumbnail
end

#titleObject (readonly)

Returns the value of attribute title.



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

def title
  @title
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end

#urlsObject (readonly)

Returns the value of attribute urls.



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

def urls
  @urls
end