Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 25 lines (19 sloc) 0.579 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#!/usr/bin/env ruby

def show_help
  STDOUT.puts <<-EOH
flexri is like ri but for ActionScript 3 documentation.

Give it a fully qualified class name and it will open you
documentation page in the browser:

flexri flash.events.Event

It supposed to work on Mac OS X. Feel free to port it to other platforms.
EOH
end

def open_documentation(path)
  system "open http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/#{path}.html"
end

arg = ARGV[0]
if arg.nil? || ["-h", "help", "--help"].include?(arg)
  show_help and exit(0)
else
  open_documentation(arg.gsub(".", "/"))
end
Something went wrong with that request. Please try again.