Convenient syntax for adding conditions to a statement. @see AWS::Core::Policy#allow @see AWS::Core::Policy#deny
@return [Array] Returns an array of policy conditions.
@private
# File lib/aws/core/policy.rb, line 188 def initialize(conditions) @conditions = conditions end
Adds a condition for the given key. For example:
policy.allow(...).where(:current_time).lte(Date.today + 1)
@return [OperatorBuilder]
# File lib/aws/core/policy.rb, line 197 def where(key, operator = nil, *values) if operator @conditions.add(operator, key, *values) self else OperatorBuilder.new(self, key) end end