Class: Thanos::StoryDataMapper
- Inherits:
-
Object
- Object
- Thanos::StoryDataMapper
- Includes:
- Mappable
- Defined in:
- lib/thanos/mappers/story_data_mapper.rb
Instance Method Summary collapse
-
#initialize(results) ⇒ StoryDataMapper
constructor
A new instance of StoryDataMapper.
- #map ⇒ Object
Constructor Details
#initialize(results) ⇒ StoryDataMapper
Returns a new instance of StoryDataMapper.
7 8 9 |
# File 'lib/thanos/mappers/story_data_mapper.rb', line 7 def initialize(results) @results = results end |
Instance Method Details
#map ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/thanos/mappers/story_data_mapper.rb', line 11 def map { title: @results['title'], description: @results['description'], type: @results['type'], resource_uri: @results['resourceURI'], characters: characters, creators: creators, events: events, series: series, comics: comics, } end |