This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# Hash.fetch (from ruby core) --- hash.fetch(key) -> object hash.fetch(key, default_value) -> object hash.fetch(key) {|key| ... } -> object --- Returns the value for the given `key`, if found. h = {foo: 0, bar: 1, baz: 2} h.fetch(:bar) # => 1 If `key` is not found and no block was given, returns `default_value`: {}.fetch(:nosuch, :default) # => :default If `key` is not found and a block was given, yields `key` to the block and returns the block's return value: {}.fetch(:nosuch) {|key| "No key #{key}"} # => "No key nosuch" Raises KeyError if neither `default_value` nor a block was given. Note that this method does not use the values of either #default or #default_proc.
This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.