Sha256: 44c5f3e2d11decb6fcaa0a1d53488fcf8fcf3696a9a8eb4196d1accec73f2e3e

Contents?: true

Size: 540 Bytes

Versions: 6

Compression:

Stored size: 540 Bytes

Contents

require 'wlang'
module Alf
  module Doc
    class ToMarkdown

      TEMPLATES = Path.backfind('doc/templates')

      def operator(op)
        to_markdown(TEMPLATES/"operator.wlang", op)
      end

      def aggregator(op)
        to_markdown(TEMPLATES/"aggregator.wlang", op)
      end

      def predicate(op)
        to_markdown(TEMPLATES/"predicate.wlang", op)
      end

    private

      def to_markdown(tpl, context)
        WLang::Html.render(tpl, context)
      end

    end # class ToMarkdown
  end # module Doc
end # module Alf

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
alf-doc-0.16.4 lib/alf/doc/to_markdown.rb
alf-doc-0.16.3 lib/alf/doc/to_markdown.rb
alf-doc-0.16.2 lib/alf/doc/to_markdown.rb
alf-doc-0.16.1 lib/alf/doc/to_markdown.rb
alf-doc-0.16.0 lib/alf/doc/to_markdown.rb
alf-doc-0.15.0 lib/alf/doc/to_markdown.rb