Class: Thanos::Factory::Comic

Inherits:
Object
  • Object
show all
Defined in:
lib/thanos/factories/comic.rb

Instance Method Summary collapse

Constructor Details

#initialize(results) ⇒ Comic

Returns a new instance of Comic.



7
8
9
# File 'lib/thanos/factories/comic.rb', line 7

def initialize(results)
  @results = results
end

Instance Method Details

#buildObject



11
12
13
14
# File 'lib/thanos/factories/comic.rb', line 11

def build
  attributes = Thanos::ComicDataMapper.new(@results).map
  Thanos::Comic.new(attributes: attributes)
end