Module: Utils::IRB::Module
- Included in:
- Module
- Defined in:
- lib/utils/irb.rb
Instance Method Summary collapse
-
#ri(pattern = nil) ⇒ Object
Start
ri
for module#pattern, trying to find a method matchingpattern
for all modules in the ancestors chain of this module.
Instance Method Details
#ri(pattern = nil) ⇒ Object
Start ri
for module#pattern, trying to find a method matching pattern
for all modules in the ancestors chain of this module.
384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/utils/irb.rb', line 384 def ri(pattern = nil) if pattern pattern = pattern.to_sym.to_s if pattern.respond_to? :to_sym ancestors.each do |a| if method = a.instance_methods(false).find { |m| pattern === m } a = Object if a == Kernel # ri seems to be confused system "ri #{a}##{method} | #{$pager}" end end else system "ri #{self} | #{$pager}" end return end |