Class: Thanos::Story

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Story

Returns a new instance of Story.



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/thanos/resources/story.rb', line 6

def initialize(args)
  @characters = args[:characters]
  @creators = args[:creators]
  @events = args[:events]
  @series = args[:series]
  @comics = args[:comics]

  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/story.rb', line 3

def characters
  @characters
end

#comicsObject (readonly)

Returns the value of attribute comics.



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

def comics
  @comics
end

#creatorsObject (readonly)

Returns the value of attribute creators.



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

def creators
  @creators
end

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#eventsObject (readonly)

Returns the value of attribute events.



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

def events
  @events
end

#resource_uriObject (readonly)

Returns the value of attribute resource_uri.



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

def resource_uri
  @resource_uri
end

#seriesObject (readonly)

Returns the value of attribute series.



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

def series
  @series
end

#thumbnailObject (readonly)

Returns the value of attribute thumbnail.



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

def thumbnail
  @thumbnail
end

#titleObject (readonly)

Returns the value of attribute title.



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

def title
  @title
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end