module AWS::DynamoDB::Expectations
Private Instance Methods
expect_conditions(options)
click to toggle source
# File lib/aws/dynamo_db/expectations.rb, line 20 def expect_conditions(options) expected = {} options[:if].each do |name, value| context = "expected value for attribute #{name}" expected[name.to_s] = { :value => format_attribute_value(value, context) } end if options[:if] [options[:unless_exists]].flatten.each do |name| expected[name.to_s] = { :exists => false } end if options[:unless_exists] expected end