Class: Client
- Inherits:
-
Object
- Object
- Client
- Defined in:
- lib/client.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize(aws_region) ⇒ Client
constructor
A new instance of Client.
- #update_function_code(function_name, s3_bucket, s3_key) ⇒ Object
Constructor Details
#initialize(aws_region) ⇒ Client
Returns a new instance of Client.
4 5 6 |
# File 'lib/client.rb', line 4 def initialize(aws_region) @client = Aws::Lambda::Client.new(region: aws_region) end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
3 4 5 |
# File 'lib/client.rb', line 3 def client @client end |
Instance Method Details
#update_function_code(function_name, s3_bucket, s3_key) ⇒ Object
8 9 10 11 |
# File 'lib/client.rb', line 8 def update_function_code(function_name, s3_bucket, s3_key) response = client.update_function_code({function_name: function_name, s3_bucket: s3_bucket, s3_key: s3_key}) puts "Updated: #{response.function_name}" end |