Class: Marver::SerieAttributesMapper
- Inherits:
-
Object
- Object
- Marver::SerieAttributesMapper
- Includes:
- Mappable
- Defined in:
- lib/marver/mappers/serie_attributes_mapper.rb
Instance Method Summary collapse
-
#initialize(results) ⇒ SerieAttributesMapper
constructor
A new instance of SerieAttributesMapper.
- #map ⇒ Object
Constructor Details
#initialize(results) ⇒ SerieAttributesMapper
Returns a new instance of SerieAttributesMapper.
6 7 8 |
# File 'lib/marver/mappers/serie_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 25 26 27 28 29 30 |
# File 'lib/marver/mappers/serie_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'], start_year: @results['startYear'], end_year: @results['endYear'], rating: @results['rating'], comics: comics, stories: stories, events: events, creators: creators, characters: characters, next: next_serie.first, previous: prev_serie.first, urls: urls, thumbnail: thumbnail } end |