Namespace
Included Modules
Information
Class Index
![show/hide quicksearch [+]](./assets/icon/find.png)
- Malt
- Malt::Engine
- Malt::Engine::Abstract
- Malt::Engine::BlueCloth
- Malt::Engine::Builder
- Malt::Engine::Erb
- Malt::Engine::Erector
- Malt::Engine::Erubis
- Malt::Engine::Haml
- Malt::Engine::Kramdown
- Malt::Engine::Less
- Malt::Engine::Liquid
- Malt::Engine::Markaby
- Malt::Engine::Mustache
- Malt::Engine::RDiscount
- Malt::Engine::RDoc
- Malt::Engine::Radius
- Malt::Engine::Radius::context;
- Malt::Engine::RagTag
- Malt::Engine::RedCloth
- Malt::Engine::Ruby
- Malt::Engine::Sass
- Malt::Engine::Tenjin
- Malt::Format
- Malt::Format::Abstract
- Malt::Format::AbstractTemplate
- Malt::Format::Builder
- Malt::Format::CSS
- Malt::Format::Erb
- Malt::Format::Erector
- Malt::Format::HTML
- Malt::Format::Haml
- Malt::Format::LESS
- Malt::Format::Latex
- Malt::Format::Liquid
- Malt::Format::Markaby
- Malt::Format::Markdown
- Malt::Format::Mustache
- Malt::Format::PDF
- Malt::Format::RBHTML
- Malt::Format::RDoc
- Malt::Format::RHTML
- Malt::Format::Radius
- Malt::Format::RagTag
- Malt::Format::Ruby
- Malt::Format::SCSS
- Malt::Format::Sass
- Malt::Format::Tenjin
- Malt::Format::Text
- Malt::Format::Textile
- Malt::Format::UnsupportedConversion
- Malt::Format::XML
- Malt::Format::YAML
- Malt::Kernel
- Malt::Machine
- Malt::Markup
- Malt::NoEngineError
- Malt::Template
- Hash
- OpenStruct
Malt
Public Class Methods
cli(*args)
click to toggle source
# File lib/malt.rb, line 48 48: def self.cli(*args) 49: require 'optparse' 50: itype, otype = nil, nil 51: OptionParser.new{|o| 52: o.on('-t TYPE', 'input type'){ |t| itype = t } 53: o.on('-o TYPE', 'output type'){ |t| otype = t } 54: o.on('--help', '-h' , 'display this help message'){ puts o; exit } 55: }.parse! 56: db, files = *args.partition{ |x| x.index('=') } 57: db = db.inject({}){ |h,kv| k,v = kv.split('='); h[k] = v; h} 58: files.each do |file| 59: puts Malt.render(:file=>file, :type=>itype, :format=>otype) 60: #file = itype ? Malt.file(file, :type=>itype) : Malt.file(file) 61: #if otype 62: # puts file.render(otype, db) 63: #else 64: # puts file.render(db) 65: #end 66: end 67: end
engine?(ext)
click to toggle source
Returns true if the extension given is renderable.
# File lib/malt.rb, line 43 43: def self.engine?(ext) 44: machine.engine?(ext) 45: end
file(file, options={})
click to toggle source
# File lib/malt.rb, line 18 18: def self.file(file, options={}) 19: machine.file(file, options) 20: end
format?(ext)
click to toggle source
# File lib/malt.rb, line 38 38: def self.format?(ext) 39: machine.format?(ext) 40: end
machine()
click to toggle source
# File lib/malt.rb, line 13 13: def self.machine 14: @machine ||= Machine.new 15: end
open(url, options={})
click to toggle source
# File lib/malt.rb, line 28 28: def self.open(url, options={}) 29: machine.open(url, options) 30: end
Disabled; run with --debug to generate this.