Class: Tilt::EmacsOrgTemplate

Inherits:
Template
  • Object
show all
Defined in:
lib/tilt/emacs_org.rb

Overview

Native Emacs Org templating engine for Tilt.

Instance Method Summary collapse

Instance Method Details

#bodyObject



18
19
20
# File 'lib/tilt/emacs_org.rb', line 18

def body
  @body ||= doc.at_css('body').inner_html
end

#headObject



13
14
15
16
# File 'lib/tilt/emacs_org.rb', line 13

def head
  @head ||= doc.at_css('head').css('script, link, style')
    .map(&:to_s).inject(:+)
end

#titleObject



22
23
24
# File 'lib/tilt/emacs_org.rb', line 22

def title
  @title ||= doc.at_css('title').content
end