class Hash

Public Instance Methods

to_js() click to toggle source

Convert a hash to a JavaScript object

# File packages/gems/js/lib/js/hash.rb, line 3
def to_js
  new_object = JS.eval("return {}")
  self.each { |key, value| new_object[key] = value }
  new_object
end