In Files
Parent
Class Index
- WebRI
- WebRI::Blackfish
- WebRI::Component
- WebRI::Generator
- WebRI::GeneratorOne
- WebRI::GitHub
- WebRI::Heirarchy
- WebRI::Highlight
- WebRI::Icons
- WebRI::JSONFile
- WebRI::Longfish
- WebRI::Metadata
- WebRI::Newfish
- WebRI::Oldfish
- WebRI::Onefish
- WebRI::Prettify
- WebRI::Redfish
- WebRI::RiService
- WebRI::Search
- WebRI::Search::FilesTree
- WebRI::Server
- WebRI::Subversion
- WebRI::Template
- WebRI::TimeDelta
- WebRI::Twofish
- RDoc
- RDoc::AnyMethod
- RDoc::ClassModule
- RDoc::Options
- RDoc::Parser
- RDoc::Parser::C
- RDoc::TopLevel
- Syckle
- Syckle::Plugins
- Syckle::Plugins::WebRI
- Object
- OpEsc
RiService
Attributes
Public Class Methods
Public Instance Methods
info(keyword)
click to toggle source
# File lib/webri/server/ri_service.rb, line 28 def info(keyword) #puts "KEYWORD: #{keyword.inspect}" html = `ri #{ri_opts} -f html #{keyword}` return "<br/>#{html}<br/><br/>" end
names()
click to toggle source
# File lib/webri/server/ri_service.rb, line 35 def names @names ||= (library ? names_from_library : names_from_all) end
names_from_all()
click to toggle source
# File lib/webri/server/ri_service.rb, line 60 def names_from_all libraries = `ri #{ri_opts} -l`.split("\n") libraries.map do |lib| names_from_library(lib) end.flatten end
names_from_library(lib=nil)
click to toggle source
# File lib/webri/server/ri_service.rb, line 40 def names_from_library(lib=nil) files = nil Dir.chdir(lib || library) do files = Dir['**/*'] files = files.map do |f| case f when /\-i.yaml$/ (File.dirname(f) + '#' + URI.unescape(File.basename(f).chomp('-i.yaml'))).gsub('/' , '::') when /\-c.yaml$/ (File.dirname(f) + '::' + URI.unescape(File.basename(f).chomp('-c.yaml'))).gsub('/' , '::') else #f.sub(/^cdesc-/,'').gsub('/' , '::') nil end end.compact end files end
Private Instance Methods
ri_opts()
click to toggle source
# File lib/webri/server/ri_service.rb, line 70 def ri_opts cmd = [] if library cmd << %[-d "#{library}" --no-standard-docs] else cmd << ( system ? "--system" : "--no-system" ) cmd << ( site ? "--site" : "--no-site" ) cmd << ( gems ? "--gems" : "--no-gems" ) cmd << ( home ? "--home" : "--no-home" ) end cmd.join(' ') end
Disabled; run with --debug to generate this.