Class: Object

Inherits:
BasicObject
Defined in:
lib/motion-docs/monkeypatching.rb

Class Method Summary collapse

Class Method Details

.docs(method_name = nil) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/motion-docs/monkeypatching.rb', line 3

def self.docs(method_name=nil)
  subject = self.to_s
  if method_name
    subject << "." unless method_name.start_with?("#") || method_name.start_with?(".")
    subject << method_name.to_s
  end
  puts MotionDocs.new(subject).help
end

.ri(m = nil) ⇒ Object



11
# File 'lib/motion-docs/monkeypatching.rb', line 11

def self.ri(m=nil); docs(m); end