Class: PaperclipLambda::Client
- Inherits:
-
Object
- Object
- PaperclipLambda::Client
- Defined in:
- lib/paperclip_lambda/client.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(function_name, payload = {}) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(function_name, payload = {}) ⇒ Client
Returns a new instance of Client.
7 8 9 10 11 12 |
# File 'lib/paperclip_lambda/client.rb', line 7 def initialize(function_name, payload = {}) lambda = ::Aws::Lambda::Client.new lambda.invoke(function_name: function_name, payload: payload.to_json, invocation_type: "Event") rescue ::Aws::Lambda::Errors::ServiceError => e @errors = e end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
5 6 7 |
# File 'lib/paperclip_lambda/client.rb', line 5 def errors @errors end |