class Maruku
This is the public interface
The Maruku class is the public interface
Constants
- MetaTests
Public Class Methods
failed(test, doc, s)
click to toggle source
# File lib/maruku/tests/tests.rb, line 27 def Maruku.failed(test, doc, s) raise "Test failed: #{s}\n*****\n#{test}\n*****\n"+ "#{doc.inspect}\n*****\n{doc.to_html}" end
metaTests()
click to toggle source
# File lib/maruku/tests/tests.rb, line 32 def Maruku.metaTests ref = {:id => 'id1', :class => ['class1','class2'], :style=> 'Style is : important = for all } things'} tests = MetaTests.split('***') for test in tests #puts "Test: #{test.inspect}" doc = Maruku.new(test) doc.children.size == 1 || failed(test, doc, "children != 1") h = doc.children[0] h.node_type==:header || failed(test, doc, "child not header") # puts doc.inspect # puts doc.to_html end end
new(s=nil, meta={})
click to toggle source
Calls superclass method
MaRuKu::MDDocument.new
# File lib/maruku/maruku.rb, line 26 def initialize(s=nil, meta={}) super(nil) self.attributes.merge! meta if s parse_doc(s) end end