class ShowRdocDocu
#¶ ↑
require 'show_rdoc_docu/version/version.rb'
#¶ ↑
Constants
- VERSION
#¶ ↑
VERSION
¶ ↑#¶ ↑
Public Class Methods
new( i = nil, format_type = '--format=markdown', run_already = true )
click to toggle source
Public Instance Methods
be_verbose?()
click to toggle source
found_a_result?()
click to toggle source
#¶ ↑
found_a_result?¶ ↑
#¶ ↑
# File lib/show_rdoc_docu/show_rdoc_docu.rb, line 66 def found_a_result? @found_a_result end
Also aliased as: found_result?
reset()
click to toggle source
restore_stdout()
click to toggle source
result=(i)
click to toggle source
result?()
click to toggle source
Also aliased as: result
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/show_rdoc_docu/show_rdoc_docu.rb, line 114 def run _ = %w( -T ) _ << @format_type # ======================================================================= # # Next we delegate into RDoc::RI::Driver.process_args # ======================================================================= # hash = RDoc::RI::Driver.process_args(_) # This hash can be passed to Driver.new rdoc_driver = RDoc::RI::Driver.new(hash) rdoc_driver.use_stdout = true @result = ''.dup # We push the output into this instance variable. $stdout = StringIO.new(@result) # Snatch all std-output. begin # Must rescue here. # @input is a String such as: "String#[]" _dataset = rdoc_driver.display_method(@input) # This will return a Fixnum. rescue RDoc::RI::Driver::NotFoundError if be_verbose? opn; e 'We did not find anything about `'+simp(@input)+'`.' end @found_a_result = false end restore_stdout # And restore stdout again. end
set_input(i = nil)
click to toggle source
show_result()
click to toggle source
#¶ ↑
show_result
¶ ↑
Simply output the result.
#¶ ↑
# File lib/show_rdoc_docu/show_rdoc_docu.rb, line 92 def show_result e result # This is the string output. end
Also aliased as: report, report_result