Class: CferExt::AWS::IAM::PolicyGenerator
- Inherits:
-
Cfer::BlockHash
- Object
- ActiveSupport::HashWithIndifferentAccess
- Cfer::Block
- Cfer::BlockHash
- CferExt::AWS::IAM::PolicyGenerator
- Defined in:
- lib/cferext/aws/iam/policy_generator.rb
Constant Summary
Constants inherited from Cfer::BlockHash
Cfer::BlockHash::NON_PROXIED_METHODS
Instance Method Summary collapse
- #allow(&block) ⇒ Object
- #deny(&block) ⇒ Object
-
#initialize ⇒ PolicyGenerator
constructor
A new instance of PolicyGenerator.
- #statement(options = {}, &block) ⇒ Object
Methods inherited from Cfer::BlockHash
#get_property, #method_missing, #properties, #respond_to?
Methods inherited from Cfer::Block
#build_from_block, #build_from_file, #build_from_string, #include_file, #post_block, #pre_block
Constructor Details
#initialize ⇒ PolicyGenerator
Returns a new instance of PolicyGenerator.
7 8 9 10 |
# File 'lib/cferext/aws/iam/policy_generator.rb', line 7 def initialize self[:Version] = '2012-10-17' self[:Statement] = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Cfer::BlockHash
Instance Method Details
#allow(&block) ⇒ Object
19 20 21 |
# File 'lib/cferext/aws/iam/policy_generator.rb', line 19 def allow(&block) statement Effect: :Allow, &block end |
#deny(&block) ⇒ Object
23 24 25 |
# File 'lib/cferext/aws/iam/policy_generator.rb', line 23 def deny(&block) statement Effect: :Deny, &block end |