to_a

hsh.to_a â array Instance Public methods Converts hsh to a nested array of [ key, value ] arrays. h = { "c" => 300, "a" => 100, "d" => 400, "c" => 300 } h.to_a #=> [["c", 300], ["a", 100], ["d", 400]]

to_h

hsh.to_h â hsh or new_hash Instance Public methods Returns self. If called on a subclass of Hash, converts the receiver to a Hash object.

to_hash

hsh.to_hash => hsh Instance Public methods Returns self.

to_s

to_s() Instance Public methods Alias for: inspect

update

hsh.update(other_hash) â hshhsh.update(other_hash){|key, oldval, newval| block} â hsh Instance Public methods Adds the contents of other_hash to hsh. If no block is specified, entries with duplicate keys are overwritten with the values from other_hash, otherwise the value of each duplicate key is determined by calling the block with the key, its value in hsh and its value in other_hash. h1 = { "a" => 100, "b" => 200 } h2 = { "b" => 254,

value?

hsh.value?(value) â true or false Instance Public methods Returns true if the given value is present for some key in hsh. h = { "a" => 100, "b" => 200 } h.has_value?(100) #=> true h.has_value?(999) #=> false

values

hsh.values â array Instance Public methods Returns a new array populated with the values from hsh. See also Hash#keys. h = { "a" => 100, "b" => 200, "c" => 300 } h.values #=> [100, 200, 300]

values_at

hsh.values_at(key, ...) â array Instance Public methods Return an array containing the values associated with the given keys. Also see Hash.select. h = { "cat" => "feline", "dog" => "canine", "cow" => "bovine" } h.values_at("cow", "cat") #=> ["bovine", "feline"]

do_GET

do_GET(req, res) Instance Public methods

hello

hello(name) Instance Public methods