Module: MarkupParser

Defined in:
lib/markup_parser.rb,
lib/markup_parser/html.rb,
lib/markup_parser/rdoc.rb,
lib/markup_parser/default.rb,
lib/markup_parser/version.rb,
lib/markup_parser/markdown.rb

Defined Under Namespace

Classes: Default, Html, Markdown, Rdoc

Constant Summary collapse

PARSER_PATH =
File.join(File.dirname(__FILE__), 'markup_parser')
VERSION =
"0.0.5"

Class Method Summary collapse

Class Method Details

.format_parsersObject



12
13
14
# File 'lib/markup_parser.rb', line 12

def self.format_parsers
  Hash[*formats.zip(parsers).flatten]
end

.formatsObject



8
9
10
# File 'lib/markup_parser.rb', line 8

def self.formats
  parser_files.collect {|f| File.basename(f, '.rb') } - ["version"]
end

.parsersObject



16
17
18
# File 'lib/markup_parser.rb', line 16

def self.parsers
  formats.collect {|f|  constantize(camelize("markup_parser/#{f}")) }
end

.reload_parsersObject



20
21
22
# File 'lib/markup_parser.rb', line 20

def self.reload_parsers
  parser_files.each { |parser_file| require parser_file }
end