class Malt::Format::YAML

YAML format

TODO: hmm… maybe use data to update yaml?

Public Instance Methods

html(*) click to toggle source

Converting a plan YAML file to HTML makes no sense so we just wrap it in pre tags.

# File lib/malt/formats/yaml.rb, line 29
def html(*)
  "<pre>\n#{h text}\n</pre>"
end
to_html(*) click to toggle source
# File lib/malt/formats/yaml.rb, line 34
def to_html(*)
  text = html
  opts = options.merge(:text=>text, :file=>refile(:html), :type=>:html)
  HTML.new(opts)
end
to_yaml(*) click to toggle source
# File lib/malt/formats/yaml.rb, line 21
def to_yaml(*)
  self
end
Also aliased as: to_yml
to_yml(*)
Alias for: to_yaml
yaml(*) click to toggle source
# File lib/malt/formats/yaml.rb, line 14
def yaml(*)
  text
end
Also aliased as: yml
yml(*)
Alias for: yaml

Private Instance Methods

h(text) click to toggle source

TODO: HTML escaping

# File lib/malt/formats/yaml.rb, line 43
def h(text)
  text
end