Class: HParser::Inline::Parser
- Inherits:
-
Object
- Object
- HParser::Inline::Parser
- Includes:
- Util
- Defined in:
- lib/hparser/inline/parser.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(parsers = Parser.default_parser) ⇒ Parser
constructor
A new instance of Parser.
- #parse(str, context = nil) ⇒ Object
Constructor Details
Class Method Details
.default_parser ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/hparser/inline/parser.rb', line 22 def self.default_parser parser = [] ObjectSpace.each_object(Class){|klass| if klass.include?(HParser::Inline::Collectable) then parser.push klass end } parser.sort{|a,b| a <=> b or -(b <=> a).to_i } end |