Class: Jets::Cfn::TemplateBuilders::IamPolicy::FunctionPolicy
- Inherits:
-
BasePolicy
- Object
- BasePolicy
- Jets::Cfn::TemplateBuilders::IamPolicy::FunctionPolicy
- Defined in:
- lib/jets/cfn/template_builders/iam_policy/function_policy.rb
Instance Attribute Summary
Attributes inherited from BasePolicy
Instance Method Summary collapse
-
#initialize(task) ⇒ FunctionPolicy
constructor
A new instance of FunctionPolicy.
-
#policy_name ⇒ Object
Example: PostsControllerIndexPolicy or SleepJobPerformPolicy.
Methods inherited from BasePolicy
#classify_name, #policy_document, #setup, #standardize
Constructor Details
#initialize(task) ⇒ FunctionPolicy
Returns a new instance of FunctionPolicy.
7 8 9 10 11 12 13 14 |
# File 'lib/jets/cfn/template_builders/iam_policy/function_policy.rb', line 7 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 |
Instance Method Details
#policy_name ⇒ Object
Example: PostsControllerIndexPolicy or SleepJobPerformPolicy
17 18 19 |
# File 'lib/jets/cfn/template_builders/iam_policy/function_policy.rb', line 17 def policy_name classify_name("#{@app_class}_#{@task.meth}_policy") end |