Method: Xqsr3::Containers::MultiMap#push

Defined in:
lib/xqsr3/containers/multi_map.rb

#push(key, *values) ⇒ Object

Pushes the given key and values. If the key is already in the map then the values will be concatenated with those already present

Signature

  • Parameters:

    • key The element key

    • values (*Array) The value(s) to be pushed

Exceptions

- +::RangeError+ raised if the value of +count+ results in a negative count for the given element
- +::TypeError+ if +count+ is not an +::Integer+


618
619
620
621
622
623
# File 'lib/xqsr3/containers/multi_map.rb', line 618

def push key, *values

	@inner[key] = [] unless @inner.has_key? key

	@inner[key].push(*values)
end