Module: Jets::Job::Helpers::S3EventHelper

Included in:
Base
Defined in:
lib/jets/job/helpers/s3_event_helper.rb

Instance Method Summary collapse

Instance Method Details

#s3_eventObject



3
4
5
6
7
# File 'lib/jets/job/helpers/s3_event_helper.rb', line 3

def s3_event
  message = event["Records"][0]["Sns"]["Message"]
  h = JSON.load(message)
  ActiveSupport::HashWithIndifferentAccess.new(h)
end

#s3_objectObject



9
10
11
# File 'lib/jets/job/helpers/s3_event_helper.rb', line 9

def s3_object
  s3_event["Records"][0]["s3"]["object"]
end