lib/jets/lambda/task.rb in jets-0.8.0 vs lib/jets/lambda/task.rb in jets-0.8.1

- old
+ new

@@ -1,10 +1,10 @@ class Jets::Lambda::Task attr_accessor :class_name, :type attr_reader :meth, :resources, :properties, :iam_policy, :managed_iam_policy, :lang def initialize(class_name, meth, options={}) - @class_name = class_name.to_s # use at EventsRuleMapper#full_task_name + @class_name = class_name.to_s @meth = meth @options = options @type = options[:type] || get_type # controller, job, or function @resources = options[:resources] || {} @properties = options[:properties] || {} @@ -78,7 +78,15 @@ base += "/#{@meth}" end def poly_src_path handler_path.sub("handlers/", "app/") + end + + ### + # Useful for Jets::Resource late building. + def replacements + { + namespace: "#{@class_name.gsub('::','')}#{@meth.to_s.camelize}", # camelized because used in not just keys but also values + } end end