Class: Dynamodb::Api::Map::Operator

Inherits:
Object
  • Object
show all
Defined in:
lib/dynamodb/api/map/operator.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.key(k) ⇒ String

Replace the Dynamodb Operators

Parameters:

  • k (String)

    The Dynamodb Operator

Returns:

  • (String)


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/dynamodb/api/map/operator.rb', line 10

def self.key(k)
  k = k.gsub(' ', '')
  case k
  when 'EQ'
    '='
  when 'NE'
    '!='
  when 'LE'
    '<='
  when 'LT'
    '<'
  when 'GE'
    '>='
  when 'GT'
    '>'
  else
    k
  end
end