Class: Module

Inherits:
Object show all
Defined in:
lib/coderunner/interactive_methods.rb

Instance Method Summary collapse

Instance Method Details

#help(meth_or_const = nil) ⇒ Object



781
782
783
784
785
786
787
788
789
790
791
792
793
# File 'lib/coderunner/interactive_methods.rb', line 781

def help(meth_or_const=nil)
	join = ""
	if meth_or_const
		if self.constants.include? meth_or_const.to_sym
			join = "::"
		elsif self.methods.include? meth_or_const.to_sym
			join = "."
		elsif self.instance_methods.include? meth_or_const.to_sym
			join = "#"
		end
	end
	CodeRunner.reference("#{self.to_s}#{join}#{meth_or_const}")
end