class Hash

Public Class Methods

new(defaults = undefined, &block) click to toggle source
# File lib/react/hash.rb, line 5
def initialize(defaults = undefined, &block)
  if (`defaults===null`)
    _pre_react_patch_initialize(&block)
  else
    _pre_react_patch_initialize(defaults, &block)
  end
end
Also aliased as: _pre_react_patch_initialize

Public Instance Methods

_pre_react_patch_initialize(defaults = undefined, &block)
Alias for: new
shallow_to_n() click to toggle source
# File lib/react/ext/hash.rb, line 2
def shallow_to_n
  hash = `{}`
  self.map do |key, value|
     `hash[#{key}] = #{value}`
  end
  hash
end