class Commutator::Options::DeleteItem
Public Class Methods
new()
click to toggle source
# File lib/commutator/options/delete_item.rb, line 20 def initialize @key = {} @expression_attribute_names = Expressions::AttributeNames.new @expression_attribute_values = Expressions::AttributeValues.new @condition_expression = Expressions::ConditionExpression.new( attribute_names: @expression_attribute_names, attribute_values: @expression_attribute_values) end
Public Instance Methods
to_h()
click to toggle source
# File lib/commutator/options/delete_item.rb, line 31 def to_h hash = { key: key, table_name: table_name, return_values: return_values, return_consumed_capacity: return_consumed_capacity, return_item_collection_metrics: return_item_collection_metrics, expression_attribute_names: expression_attribute_names.to_h, expression_attribute_values: expression_attribute_values.to_h, condition_expression: condition_expression.to_s(wrap: false) } hash.keep_if { |_key, value| value.present? || value == false } end
Also aliased as: to_hash