Class: Miam::DSL::Context::Role
- Inherits:
-
Object
- Object
- Miam::DSL::Context::Role
- Includes:
- TemplateHelper
- Defined in:
- lib/miam/dsl/context/role.rb
Instance Method Summary collapse
-
#initialize(context, name, &block) ⇒ Role
constructor
A new instance of Role.
- #result ⇒ Object
Methods included from TemplateHelper
Constructor Details
#initialize(context, name, &block) ⇒ Role
Returns a new instance of Role.
4 5 6 7 8 9 |
# File 'lib/miam/dsl/context/role.rb', line 4 def initialize(context, name, &block) @role_name = name @context = context.merge(:role_name => name) @result = {:instance_profiles => [], :max_session_duration => 3600, :policies => {}, :attached_managed_policies => []} instance_eval(&block) end |
Instance Method Details
#result ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/miam/dsl/context/role.rb', line 11 def result unless @result[:assume_role_policy_document] raise "Role `#{@role_name}`: AssumeRolePolicyDocument is not defined" end @result end |