Sha256: 7ec5e22d08000f0230b9245b402c3e427bc82b6d994469b7578f72fd98c519dd

Contents?: true

Size: 502 Bytes

Versions: 2

Compression:

Stored size: 502 Bytes

Contents

require 'thanos/mappers/mappable'

module Thanos
  class StoryDataMapper
    include Thanos::Mappable

    def initialize(results)
      @results = results
    end

    def map
      {
        title: @results['title'],
        description: @results['description'],
        type: @results['type'],
        resource_uri: @results['resourceURI'],
        characters: characters,
        creators: creators,
        events: events,
        series: series,
        comics: comics,
      }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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