class Hash

Public Instance Methods

extractable_options?() click to toggle source

By default, only instances of Hash itself are extractable. Subclasses of Hash may implement this method and return true to declare themselves as extractable. If a Hash is extractable, Array#extract_options! pops it from the Array when it is the last element of the Array.

# File vendor/active_support/core_ext/array/extract_options.rb, line 7
def extractable_options?
  instance_of?(Hash)
end
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