Class: SexpBuilder::QueryBuilder::Data

Inherits:
Hash
  • Object
show all
Defined in:
lib/sexp_builder/query_builder.rb

Instance Method Summary collapse

Instance Method Details

#[]=(key, value) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/sexp_builder/query_builder.rb', line 4

def []=(key, value)
  if current = self[key]
    if current.class == Array
      current << value
    else
      super(key, [current, value])
    end
  else
    super
  end
end