module WikiScript

Constants

todo: fix? - strip spaces from link and title

spaces possible? strip in ruby later e.g. use strip - why? why not?
todo/change: find a better name - rename LINK_PATTERN to LINK_REGEX - why? why not?
VERSION

Public Class Methods

banner() click to toggle source
download( title, lang: Wikiscript.lang )
Alias for: get
fetch( title, lang: Wikiscript.lang )
Alias for: get
get( title, lang: Wikiscript.lang ) click to toggle source
# File lib/wikiscript.rb, line 96
def self.get( title, lang: Wikiscript.lang )      Page.get( title, lang: lang ); end
Also aliased as: fetch, download
lang() click to toggle source
# File lib/wikiscript.rb, line 34
def self.lang
  # note: for now always returns a string e.g. 'en', 'de' etc. not a symbol
  @@lang ||= 'en'
end
lang=(value) click to toggle source

for now make lang a global - change why? why not??

# File lib/wikiscript.rb, line 30
def self.lang=(value)
  @@lang = value.to_s     # use to_s - lets you pass ing :en, :de etc.
end
parse( text ) click to toggle source

more convenience shortcuts / helpers

# File lib/wikiscript.rb, line 92
def self.parse( text )        PageReader.parse( text );  end
parse_table( text ) click to toggle source
# File lib/wikiscript.rb, line 93
def self.parse_table( text )  TableReader.parse_table( text );  end
read( path ) click to toggle source
# File lib/wikiscript.rb, line 95
def self.read( path )                             Page.read( path ); end
root() click to toggle source
# File lib/wikiscript/version.rb, line 9
def self.root
  "#{File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )}"
end