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