Parent

Methods

Included Modules

Class/Module Index [+]

Quicksearch

Rabbit::Parser::Wiki

Public Class Methods

match?(source) click to toggle source
# File lib/rabbit/parser/wiki.rb, line 19
def match?(source)
  extension = source.extension
  if extension.nil?
    head = source.read[0, 500]
    if head.respond_to?(:force_encoding)
      head.force_encoding("ASCII-8BIT")
    end
    /^!/.match(head)
  else
    /\A(?:hiki|wiki)\z/ =~ extension
  end
end

Public Instance Methods

parse() click to toggle source
# File lib/rabbit/parser/wiki.rb, line 34
def parse
  parser = HikiDoc.new(RabbitOutput.new(@canvas),
                       :use_wiki_name => false)
  parser.compile(@source.read)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.