Module: Looksee
- Defined in:
- lib/looksee/help.rb,
lib/looksee/clean.rb,
lib/looksee/editor.rb,
lib/looksee/adapter.rb,
lib/looksee/version.rb,
lib/looksee/core_ext.rb,
lib/looksee/inspector.rb,
lib/looksee/columnizer.rb,
lib/looksee/lookup_path.rb,
lib/looksee/adapter/base.rb,
lib/looksee/adapter/rubinius.rb,
lib/looksee/wirble_compatibility.rb
Defined Under Namespace
Modules: Adapter, Columnizer, ObjectMixin, WirbleCompatibility Classes: Editor, Help, Inspector, LookupPath
Constant Summary collapse
- VERSION =
[1, 0, 0]
Class Attribute Summary collapse
-
.adapter ⇒ Object
The interpreter adapter.
-
.default_specifiers ⇒ Object
The default options passed to #ls.
-
.default_width ⇒ Object
The width to use for displaying output, when not available in the COLUMNS environment variable.
-
.editor ⇒ Object
The editor command, used for Object#edit.
-
.ruby_engine ⇒ Object
Wrapper around RUBY_ENGINE that’s always defined.
-
.styles ⇒ Object
The default styles to use for the
inspect
strings.
Class Method Summary collapse
-
.help ⇒ Object
Show a quick reference.
Class Attribute Details
.adapter ⇒ Object
The interpreter adapter.
Encapsulates the interpreter-specific functionality.
81 82 83 |
# File 'lib/looksee/clean.rb', line 81 def adapter @adapter end |
.default_specifiers ⇒ Object
The default options passed to #ls.
Default: [:public, :protected, :private, :undefined, :overridden]
22 23 24 |
# File 'lib/looksee/clean.rb', line 22 def default_specifiers @default_specifiers end |
.default_width ⇒ Object
The width to use for displaying output, when not available in the COLUMNS environment variable.
Default: 80
30 31 32 |
# File 'lib/looksee/clean.rb', line 30 def default_width @default_width end |
.editor ⇒ Object
The editor command, used for Object#edit.
This string should contain a “%f”, which is replaced with the file name, and/or “%l” which is replaced with the line number. A “%%” is replaced with “%”.
If the LOOKSEE_EDITOR environment variable is set, it is used as the default. Otherwise, we use the following heuristic:
If EDITOR is set, we use that. If it looks like vi, emacs, or textmate, we also append options to position the cursor on the appropriate line. If EDITOR is not set, we use “vi +%l %f”.
74 75 76 |
# File 'lib/looksee/clean.rb', line 74 def editor @editor end |
.ruby_engine ⇒ Object
Wrapper around RUBY_ENGINE that’s always defined.
86 87 88 |
# File 'lib/looksee/clean.rb', line 86 def ruby_engine @ruby_engine end |
.styles ⇒ Object
The default styles to use for the inspect
strings.
This is a hash with keys:
-
:module
-
:public
-
:protected
-
:private
-
:undefined
-
:overridden
The values are format strings. They should all contain a single “%s”, which is where the name is inserted.
Default:
{
:module => "\e[1;37m%s\e[0m", # white
:public => "\e[1;32m%s\e[0m", # green
:protected => "\e[1;33m%s\e[0m", # yellow
:private => "\e[1;31m%s\e[0m", # red
:undefined => "\e[1;34m%s\e[0m", # blue
:overridden => "\e[1;30m%s\e[0m", # black
}
58 59 60 |
# File 'lib/looksee/clean.rb', line 58 def styles @styles end |
Class Method Details
.help ⇒ Object
Show a quick reference.
91 92 93 |
# File 'lib/looksee/clean.rb', line 91 def help Help.new end |