Sha256: 6d46ff1372b6ae6e6d0960f9da9b774af600c022721299c119aea10aece8466e

Contents?: true

Size: 545 Bytes

Versions: 13

Compression:

Stored size: 545 Bytes

Contents

# Implements:
#   initialize
#   policy_name
#
module Jets::Cfn::TemplateBuilders::IamPolicy
  class FunctionPolicy < BasePolicy
    def initialize(task)
      setup
      @task = task
      @app_class = task.class_name.to_s
      # IE: @app_class: PostsController, HardJob, Hello, HelloFunction

      @definitions = task.iam_policy || [] # iam_policy contains definitions
    end

    # Example: PostsControllerIndexPolicy or SleepJobPerformPolicy
    def policy_name
      classify_name("#{@app_class}_#{@task.meth}_policy")
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
jets-0.8.0 lib/jets/cfn/template_builders/iam_policy/function_policy.rb
jets-0.7.1 lib/jets/cfn/template_builders/iam_policy/function_policy.rb
jets-0.7.0 lib/jets/cfn/template_builders/iam_policy/function_policy.rb
jets-0.6.9 lib/jets/cfn/template_builders/iam_policy/function_policy.rb
jets-0.6.8 lib/jets/cfn/template_builders/iam_policy/function_policy.rb
jets-0.6.7 lib/jets/cfn/template_builders/iam_policy/function_policy.rb
jets-0.6.6 lib/jets/cfn/template_builders/iam_policy/function_policy.rb
jets-0.6.5 lib/jets/cfn/template_builders/iam_policy/function_policy.rb
jets-0.6.4 lib/jets/cfn/template_builders/iam_policy/function_policy.rb
jets-0.6.3 lib/jets/cfn/template_builders/iam_policy/function_policy.rb
jets-0.6.2 lib/jets/cfn/template_builders/iam_policy/function_policy.rb
jets-0.6.1 lib/jets/cfn/template_builders/iam_policy/function_policy.rb
jets-0.6.0 lib/jets/cfn/template_builders/iam_policy/function_policy.rb