Class: Funktor::Aws::Sqs::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/funktor/aws/sqs/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_data) ⇒ Event

Returns a new instance of Event.



6
7
8
# File 'lib/funktor/aws/sqs/event.rb', line 6

def initialize(event_data)
  @event_data = event_data
end

Instance Attribute Details

#event_dataObject

Returns the value of attribute event_data.



5
6
7
# File 'lib/funktor/aws/sqs/event.rb', line 5

def event_data
  @event_data
end

Instance Method Details

#jobsObject



14
15
16
# File 'lib/funktor/aws/sqs/event.rb', line 14

def jobs
  records.map(&:job)
end

#recordsObject



10
11
12
# File 'lib/funktor/aws/sqs/event.rb', line 10

def records
  @records ||= @event_data["Records"].map{|record_data| Funktor::Aws::Sqs::Record.new(record_data) }
end