Module Gist
In: lib/gist.rb
lib/gist/version.rb
lib/gist/standalone.rb
lib/gist/manpage.rb

You can use this class from other scripts with the greatest of ease.

  >> Gist.read(gist_id)
  Returns the body of gist_id as a string.

  >> Gist.write(content)
  Creates a gist from the string `content`. Returns the URL of the
  new gist.

  >> Gist.copy(string)
  Copies string to the clipboard.

  >> Gist.browse(url)
  Opens URL in your default browser.

Methods

browse   copy   execute   read   write  

Classes and Modules

Module Gist::Manpage
Module Gist::Standalone

Constants

GIST_URL = 'https://api.github.com/gists/%s'
CREATE_URL = 'https://api.github.com/gists'
PROXY = URI(ENV['HTTPS_PROXY'])
PROXY = URI(ENV['HTTP_PROXY'])
PROXY = nil
PROXY_HOST = PROXY ? PROXY.host : nil
PROXY_PORT = PROXY ? PROXY.port : nil
VERSION = Version = '3.1.0'

Public Instance methods

Given a url, tries to open it in your browser. TODO: Linux

Tries to copy passed content to the clipboard.

Parses command line arguments and does what needs to be done.

Given a gist id, returns its content.

[Validate]