Class: Thanos::CreatorDataMapper
- Inherits:
-
Object
- Object
- Thanos::CreatorDataMapper
- Includes:
- Mappable
- Defined in:
- lib/thanos/mappers/creator_data_mapper.rb
Instance Method Summary collapse
-
#initialize(results) ⇒ CreatorDataMapper
constructor
A new instance of CreatorDataMapper.
- #map ⇒ Object
Constructor Details
#initialize(results) ⇒ CreatorDataMapper
Returns a new instance of CreatorDataMapper.
7 8 9 |
# File 'lib/thanos/mappers/creator_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 |
# File 'lib/thanos/mappers/creator_data_mapper.rb', line 11 def map { id: @results['id'], first_name: @results['firstName'], middle_name: @results['middleName'], last_name: @results['lastName'], suffix: @results['suffix'], full_name: @results['fullName'], description: @results['description'], resource_uri: @results['resourceURI'], urls: urls, thumbnail: thumbnail, series: series, stories: stories, comics: comics, events: events, } end |