This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# String.each_line (from ruby core) --- str.each_line(separator=$/, chomp: false) {|substr| block } -> str str.each_line(separator=$/, chomp: false) -> an_enumerator --- Splits *str* using the supplied parameter as the record separator (`$/` by default), passing each substring in turn to the supplied block. If a zero-length record separator is supplied, the string is split into paragraphs delimited by multiple successive newlines. If `chomp` is `true`, `separator` will be removed from the end of each line. If no block is given, an enumerator is returned instead. "hello\nworld".each_line {|s| p s} # prints: # "hello\n" # "world" "hello\nworld".each_line('l') {|s| p s} # prints: # "hel" # "l" # "o\nworl" # "d" "hello\n\n\nworld".each_line('') {|s| p s} # prints # "hello\n\n" # "world" "hello\nworld".each_line(chomp: true) {|s| p s} # prints: # "hello" # "world" "hello\nworld".each_line('l', chomp: true) {|s| p s} # prints: # "he" # "" # "o\nwor" # "d"
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.