ri is cool -- library reference at your fingertips (literally ;))
Is there a gem that helps me do something similar with language
reference with syntax and an example or two? For instance,
$ rubyi
-> case
--> multiway decision control structure
--> example: tax = case income
when ... then ...
when ... then ...
else
end
-> rescue
... etc.
Regards,
Kedar
···
--
Posted via http://www.ruby-forum.com/.
ri is cool -- library reference at your fingertips (literally ;))
Is there a gem that helps me do something similar with language
reference with syntax and an example or two? For instance,
$ rubyi
-> case
--> multiway decision control structure
--> example: tax = case income
when ... then ...
when ... then ...
else
end
-> rescue
... etc.
Here is a quick and dirty start:
···
On Jan 15, 2011, at 11:10 , Kedar Mhaswade wrote:
#!/usr/bin/ruby -w
require "open-uri"
url = "Ruby | zenspider.com | by ryan davis;
f = URI.parse(url).read.split(/\n\n+/)
ARGV.each do |arg|
puts f.grep(/#{arg}/).join("\n\n").gsub(/<[^>]+?>/, '')
end