lib/convection/model/mixin/policy.rb in convection-0.2.6 vs lib/convection/model/mixin/policy.rb in convection-0.2.7
- old
+ new
@@ -28,9 +28,17 @@
add_statement.instance_exec(&block) if block
statement(add_statement)
end
+ def deny(sid = nil, &block)
+ add_statement = Statement.new('Deny', @template)
+ add_statement.sid = sid unless sid.nil?
+ add_statement.instance_exec(&block) if block
+
+ statement(add_statement)
+ end
+
def document
{
'Version' => version,
'Statement' => statement.map(&:render)
}