Class: Thanos::Factory::Event

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

Instance Method Summary collapse

Constructor Details

#initialize(results) ⇒ Event

Returns a new instance of Event.



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

def initialize(results)
  @results = results
end

Instance Method Details

#buildObject



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

def build
  attributes = Thanos::EventDataMapper.new(@results).map
  Thanos::Event.new(attributes: attributes)
end