Class: Looksee::Help

Inherits:
Object
  • Object
show all
Includes:
PrettyPrintHack
Defined in:
lib/looksee/help.rb

Instance Method Summary collapse

Methods included from PrettyPrintHack

#pretty_print

Instance Method Details

#inspectObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/looksee/help.rb', line 5

def inspect
  "    |== Looksee Quick Reference\n    |\n    |  \\e[1mobject.look(*specifiers)\\e[0m  or  \\e[1mLooksee[object, *specifiers]\\e[0m\n    |\n    |    Print the methods of \\`object\\'.\n    |\n    |    Available specifiers:\n    |\n    |      :public     :private    :overridden\n    |      :protected  :undefined\n    |        Print methods with these visibilities.\n    |\n    |      :nopublic     :noprivate    :nooverridden\n    |      :noprotected  :noundefined\n    |        Do not print methods with these visibilities.\n    |\n    |      \"string\"\n    |        Print methods containing this string.\n    |\n    |      /regexp/\n    |        Print methods matching this regexp.\n    |\n    |    Styles:\n    |\n    |      \#{Looksee.styles[:module] % 'Module'}\n    |      \#{Looksee.styles[:public] % 'public'}     }\n    |      \#{Looksee.styles[:protected] % 'protected'}  } like a traffic light!\n    |      \#{Looksee.styles[:private] % 'private'}    }\n    |      \#{Looksee.styles[:undefined] % 'undefined'}  ] like a ghost!\n    |      \#{Looksee.styles[:overridden] % 'overridden'} ] like a shadow!\n    |\n    |      Customize with Looksee.styles:\n    |\n    |        Looksee.styles = {\n    |          :module => '**%s**',\n    |          :private => '(%s)',\n    |          ...\n    |        }\n    |\n    |  \\e[1mobject.look.edit(method)\\e[0m\n    |\n    |    Jump to the source of the given method. Set your editor\n    |    with Looksee.editor or the LOOKSEE_EDITOR environment\n    |    variable. \"%f\" expands to the file name, \"%l\" to the line\n    |    number. Example:\n    |\n    |    Looksee.editor = \"emacs -nw +%f %l\"\n  EOS\nend\n".gsub(/^ *\|/, '')