Class: Marver::EventAttributesMapper
- Inherits:
-
Object
- Object
- Marver::EventAttributesMapper
- Includes:
- Mappable
- Defined in:
- lib/marver/mappers/event_attributes_mapper.rb
Instance Method Summary collapse
-
#initialize(results) ⇒ EventAttributesMapper
constructor
A new instance of EventAttributesMapper.
- #map ⇒ Object
Constructor Details
#initialize(results) ⇒ EventAttributesMapper
Returns a new instance of EventAttributesMapper.
6 7 8 |
# File 'lib/marver/mappers/event_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 |
# File 'lib/marver/mappers/event_attributes_mapper.rb', line 10 def map { title: @results['title'], resource_uri: @results['resourceURI'], description: @results['description'], id: @results['id'].to_i, next: next_event, previous: previous_event, creators: creators, characters: characters, series: series, stories: stories, comics: comics, urls: urls, thumbnail: thumbnail, start: start_date, end: end_date } end |