Module: ClassSource
- Defined in:
- lib/class_source.rb,
lib/class_source/index.rb,
lib/class_source/locator.rb,
lib/class_source/scanner.rb,
lib/class_source/version.rb,
lib/class_source/collator.rb,
lib/class_source/declarations.rb,
lib/class_source/method_index.rb,
lib/class_source/class_method_index.rb
Overview
extend your class with ClassSource in order to inspect its source
Defined Under Namespace
Classes: ClassMethodIndex, Collator, Declarations, Index, Locator, MethodIndex, Scanner
Constant Summary collapse
- VERSION =
"0.0.2"
Instance Method Summary collapse
-
#__source__(options = {}) ⇒ Object
Returns a proxy for inspecting the source of a class To view the source as a string, use ExampleClass.__source__.to_s.
Instance Method Details
#__source__(options = {}) ⇒ Object
Returns a proxy for inspecting the source of a class To view the source as a string, use
ExampleClass.__source__.to_s
To view the source as a hash of file/line locations and strings, use
ExampleClass.__source__.all
@return an index of all source code used to construct the class
19 20 21 |
# File 'lib/class_source.rb', line 19 def __source__(={}) Index.new(self, ) end |