class Tumblargh::Renderer::Document

Public Instance Methods

boolean(key) click to toggle source
# File lib/tumblargh/renderer/document.rb, line 46
def boolean(key)
  custom_value_for_type :if, key
end
color(key) click to toggle source

Appearance options www.tumblr.com/docs/en/custom_themes#appearance-options

# File lib/tumblargh/renderer/document.rb, line 30
def color(key)
  custom_value_for_type :color, key
end
custom_value_for_type(type, key) click to toggle source
# File lib/tumblargh/renderer/document.rb, line 50
def custom_value_for_type(type, key)
  config[type][key] rescue raise "No appearance option for #{type}:#{key}"
end
favicon() click to toggle source
# File lib/tumblargh/renderer/document.rb, line 19
def favicon
  # TODO
  ''
end
font(key) click to toggle source
# File lib/tumblargh/renderer/document.rb, line 34
def font(key)
  custom_value_for_type :font, key
end
image(key) click to toggle source
# File lib/tumblargh/renderer/document.rb, line 38
def image(key)
  custom_value_for_type :image, key
end
meta_description() click to toggle source
# File lib/tumblargh/renderer/document.rb, line 14
def meta_description
  strip_html(description)
  strip_html(description)
end
render() click to toggle source

END TAGS ——

# File lib/tumblargh/renderer/document.rb, line 56
def render
  node.map do |n|
    renderer = Renderer.factory(n, self)
    renderer.render unless renderer.nil?
  end.flatten.join('')
end
rss() click to toggle source
# File lib/tumblargh/renderer/document.rb, line 24
def rss
  "#{context.url}rss"
end
text(key) click to toggle source
# File lib/tumblargh/renderer/document.rb, line 42
def text(key)
  custom_value_for_type :text, key
end