Module: Wirble::RiShortcut
- Defined in:
- lib/wirble.rb
Overview
Convenient shortcut for ri
Class Method Summary collapse
Class Method Details
.init ⇒ Object
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 |
# File 'lib/wirble.rb', line 477 def self.init Kernel.class_eval { def ri(arg) puts `ri '#{arg}'` end } Module.instance_eval { def ri(meth=nil) if meth if instance_methods(false).include? meth.to_s puts `ri #{self}##{meth}` else super end else puts `ri #{self}` end end } end |