This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# Hash.filter (from ruby core) --- filter() --- Hash#filter is an alias for Hash#select. Returns a new Hash object whose entries are those for which the block returns a truthy value: h = {foo: 0, bar: 1, baz: 2} h.select {|key, value| value < 2 } # => {:foo=>0, :bar=>1} Returns a new Enumerator if no block given: h = {foo: 0, bar: 1, baz: 2} e = h.select # => #<Enumerator: {:foo=>0, :bar=>1, :baz=>2}:select> e.each {|key, value| value < 2 } # => {:foo=>0, :bar=>1} (This method is an alias for Hash#select.) Hash#filter is an alias for Hash#select. Returns a new Hash object whose entries are those for which the block returns a truthy value: h = {foo: 0, bar: 1, baz: 2} h.select {|key, value| value < 2 } # => {:foo=>0, :bar=>1} Returns a new Enumerator if no block given: h = {foo: 0, bar: 1, baz: 2} e = h.select # => #<Enumerator: {:foo=>0, :bar=>1, :baz=>2}:select> e.each {|key, value| value < 2 } # => {:foo=>0, :bar=>1}
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.