module Fetcher

Constants

MAJOR
MINOR
PATCH
VERSION

Public Class Methods

banner() click to toggle source

version string for generator meta tag (includes ruby version)

copy( src, dest, opts={} ) click to toggle source

convenience shortcuts

# File lib/fetcher.rb, line 56
def self.copy( src, dest, opts={} )
  Worker.new.copy( src, dest, opts )
end
get( src ) click to toggle source
# File lib/fetcher.rb, line 74
def self.get( src )
  Worker.new.get( src )
end
main() click to toggle source
# File lib/fetcher.rb, line 35
def self.main

  ## NB: only load (require) cli code if called

  require 'fetcher/cli/runner'
  
  # allow env variable to set RUBYOPT-style default command line options
  #   e.g. -o site
  fetcheropt = ENV[ 'FETCHEROPT' ]
  
  args = []
  args += fetcheropt.split if fetcheropt
  args += ARGV.dup
  
  Runner.new.run(args)
end
read( src ) click to toggle source
# File lib/fetcher.rb, line 61
def self.read( src )
  Worker.new.read( src )
end
read_blob!( src ) click to toggle source
# File lib/fetcher.rb, line 65
def self.read_blob!( src )
  Worker.new.read_blob!( src )
end
read_utf8!( src ) click to toggle source
# File lib/fetcher.rb, line 69
def self.read_utf8!( src )
  Worker.new.read_utf8!( src )
end
root() click to toggle source
# File lib/fetcher/version.rb, line 18
def self.root
  "#{File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )}"
end
version() click to toggle source
# File lib/fetcher/version.rb, line 9
def self.version
  VERSION
end