Class: Thanos::EventDataMapper
- Inherits:
-
Object
- Object
- Thanos::EventDataMapper
- Includes:
- Mappable
- Defined in:
- lib/thanos/mappers/event_data_mapper.rb
Instance Method Summary collapse
-
#initialize(results) ⇒ EventDataMapper
constructor
A new instance of EventDataMapper.
- #map ⇒ Object
Constructor Details
#initialize(results) ⇒ EventDataMapper
Returns a new instance of EventDataMapper.
7 8 9 |
# File 'lib/thanos/mappers/event_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 24 25 26 27 28 29 |
# File 'lib/thanos/mappers/event_data_mapper.rb', line 11 def map { id: @results['id'], title: @results['title'], description: @results['description'], resource_uri: @results['resourceURI'], start: start_date, end: end_date, urls: urls, thumbnail: thumbnail, creators: creators, characters: characters, series: series, stories: stories, comics: comics, next: next_event, previous: previous_event, } end |