Class: Thanos::Factory::Series

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

Instance Method Summary collapse

Constructor Details

#initialize(results) ⇒ Series

Returns a new instance of Series.



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

def initialize(results)
  @results = results
end

Instance Method Details

#buildObject



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

def build
  attributes = Thanos::SeriesDataMapper.new(@results).map
  Thanos::Series.new(attributes: attributes)
end