### Home Classes Methods

### In Files

- lib/maruku/maruku.rb
- lib/maruku/tests/new_parser.rb
- lib/maruku/tests/tests.rb
- lib/maruku.rb

### Parent

MaRuKu::MDDocument

### Methods

- ::failed
- ::metaTests
- ::new

### Included Modules

- MaRuKu::Tests

### Class/Module Index

Quicksearch

- MaRuKu
- MaRuKu::Errors
- MaRuKu::Exception
- MaRuKu::Helpers
- MaRuKu::In
- MaRuKu::In::Markdown
- MaRuKu::In::Markdown::BlockLevelParser
- MaRuKu::In::Markdown::BlockLevelParser::BlockContext
- MaRuKu::In::Markdown::BlockLevelParser::LineSource
- MaRuKu::In::Markdown::SpanExtension
- MaRuKu::In::Markdown::SpanLevelParser
- MaRuKu::In::Markdown::SpanLevelParser::CharSourceDebug
- MaRuKu::In::Markdown::SpanLevelParser::CharSourceManual
- MaRuKu::In::Markdown::SpanLevelParser::CharSourceStrscan
- MaRuKu::In::Markdown::SpanLevelParser::HTMLHelper
- MaRuKu::In::Markdown::SpanLevelParser::SpanContext
- MaRuKu::MDDocument
- MaRuKu::MDElement
- MaRuKu::Out
- MaRuKu::Out::HTML
- MaRuKu::Out::Latex
- MaRuKu::Out::Latex::LatexEntity
- MaRuKu::Out::Markdown
- MaRuKu::Section
- MaRuKu::Strings
- MaRuKu::Tests
- Array
- Hash
- Maruku
- Module
- NilClass
- Object
- String
- Textile2Signature

No matching classes.

# Maruku

The Maruku class is the public interface

This 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

    # 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.