Sha256: 38634852fe24b2383585cf96820253e5ef82280b1769110a1d10e744000542a3

Contents?: true

Size: 688 Bytes

Versions: 2

Compression:

Stored size: 688 Bytes

Contents

require 'thanos/mappers/mappable'

module Thanos
  class CreatorDataMapper
    include Thanos::Mappable

    def initialize(results)
      @results = results
    end

    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
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
thanos-0.6.0 lib/thanos/mappers/creator_data_mapper.rb
thanos-0.5.0 lib/thanos/mappers/creator_data_mapper.rb