Method: Orchestrate::KeyValue#decrement

Defined in:
lib/orchestrate/key_value.rb

#decrement(path, amount) ⇒ Object Also known as: dec

Decreases a KeyValue item's field number value by given amount if existing value is not a number type

Parameters:

  • path (#to_s)

    The field (with a number value) to decrement.

  • amount (Integer)

    The amount to decrement the field's value by.

Returns:

  • Orchestrate::KeyValue::OperationSet

Raises:

  • Orchestrate::API::RequestError if field does not exist or



314
315
316
# File 'lib/orchestrate/key_value.rb', line 314

def decrement(path, amount)
  OperationSet.new(self).decrement(path, amount)
end