This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# String.tr (from ruby core) --- str.tr(from_str, to_str) => new_str --- Returns a copy of `str` with the characters in `from_str` replaced by the corresponding characters in `to_str`. If `to_str` is shorter than `from_str`, it is padded with its last character in order to maintain the correspondence. "hello".tr('el', 'ip') #=> "hippo" "hello".tr('aeiou', '*') #=> "h*ll*" "hello".tr('aeiou', 'AA*') #=> "hAll*" Both strings may use the `c1-c2` notation to denote ranges of characters, and `from_str` may start with a `^`, which denotes all characters except those listed. "hello".tr('a-y', 'b-z') #=> "ifmmp" "hello".tr('^aeiou', '*') #=> "*e**o" The backslash character `\` can be used to escape `^` or `-` and is otherwise ignored unless it appears at the end of a range or the end of the `from_str` or `to_str`: "hello^world".tr("\\^aeiou", "*") #=> "h*ll**w*rld" "hello-world".tr("a\\-eo", "*") #=> "h*ll**w*rld" "hello\r\nworld".tr("\r", "") #=> "hello\nworld" "hello\r\nworld".tr("\\r", "") #=> "hello\r\nwold" "hello\r\nworld".tr("\\\r", "") #=> "hello\nworld" "X['\\b']".tr("X\\", "") #=> "['b']" "X['\\b']".tr("X-\\]", "") #=> "'b'"
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.