Class: Jets::Cfn::TemplateBuilders::IamPolicy::ClassPolicy
- Inherits:
-
BasePolicy
- Object
- BasePolicy
- Jets::Cfn::TemplateBuilders::IamPolicy::ClassPolicy
- Defined in:
- lib/jets/cfn/template_builders/iam_policy/class_policy.rb
Instance Attribute Summary
Attributes inherited from BasePolicy
Instance Method Summary collapse
-
#initialize(app_class) ⇒ ClassPolicy
constructor
A new instance of ClassPolicy.
-
#policy_name ⇒ Object
Example: PostsControllerPolicy or SleepJobPolicy Note: There is no “method” in the name.
Methods inherited from BasePolicy
#classify_name, #policy_document, #setup, #standardize
Constructor Details
#initialize(app_class) ⇒ ClassPolicy
Returns a new instance of ClassPolicy.
7 8 9 10 11 12 |
# File 'lib/jets/cfn/template_builders/iam_policy/class_policy.rb', line 7 def initialize(app_class) setup @app_class = app_class # IE: @app_class: PostsController, HardJob, Hello, HelloFunction @definitions = app_class.class_iam_policy || [] # class_iam_policy contains definitions end |
Instance Method Details
#policy_name ⇒ Object
Example: PostsControllerPolicy or SleepJobPolicy Note: There is no “method” in the name
16 17 18 |
# File 'lib/jets/cfn/template_builders/iam_policy/class_policy.rb', line 16 def policy_name classify_name("#{@app_class}_policy") end |