Class: Lambchop::Cat
- Inherits:
-
Object
- Object
- Lambchop::Cat
- Defined in:
- lib/lambchop/cat.rb
Class Method Summary collapse
Instance Method Summary collapse
- #cat ⇒ Object
-
#initialize(function_name, invoke_args, options = {}) ⇒ Cat
constructor
A new instance of Cat.
Constructor Details
#initialize(function_name, invoke_args, options = {}) ⇒ Cat
Returns a new instance of Cat.
6 7 8 9 10 11 |
# File 'lib/lambchop/cat.rb', line 6 def initialize(function_name, invoke_args, = {}) @function_name = function_name @invoke_args = invoke_args @client = [:client] || Aws::Lambda::Client.new @options = end |
Class Method Details
.cat(function_name, invoke_args, options = {}) ⇒ Object
2 3 4 |
# File 'lib/lambchop/cat.rb', line 2 def self.cat(function_name, invoke_args, = {}) self.new(function_name, invoke_args, ).cat end |
Instance Method Details
#cat ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/lambchop/cat.rb', line 13 def cat invoke_args = @invoke_args if invoke_args.kind_of?(IO) invoke_args = invoke_args.read end @client.invoke_async( :function_name => @function_name, :invoke_args => invoke_args ) end |