Sha256: 28345f8e7729d9abe830629f5fdadfee3c71c4993ccf7b6dcde2dd7ca1568a1c

Contents?: true

Size: 349 Bytes

Versions: 2

Compression:

Stored size: 349 Bytes

Contents

require 'thanos/mappers/story_data_mapper'
require 'thanos/resources/story'

module Thanos
  module Factory
    class Story
      def initialize(results)
        @results = results
      end

      def build
        attributes = Thanos::StoryDataMapper.new(@results).map
        Thanos::Story.new(attributes: attributes)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
thanos-0.6.0 lib/thanos/factories/story.rb
thanos-0.5.0 lib/thanos/factories/story.rb