Class: Tilt::EmacsRuby::OrgTemplate

Inherits:
Template
  • Object
show all
Defined in:
lib/emacs-ruby/tilt.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.engine_initialized?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/emacs-ruby/tilt.rb', line 4

def self.engine_initialized?
  defined? Middleman::Org
end

Instance Method Details

#evaluate(scope, locals, &block) ⇒ Object



17
18
19
# File 'lib/emacs-ruby/tilt.rb', line 17

def evaluate(scope, locals, &block)
  @output = @engine.org_to_html file
end

#initialize_engineObject



8
9
10
# File 'lib/emacs-ruby/tilt.rb', line 8

def initialize_engine
  require 'emacs-ruby'
end

#prepareObject



12
13
14
15
# File 'lib/emacs-ruby/tilt.rb', line 12

def prepare
  @engine = ::EmacsRuby::Emacs.new
  @output = nil
end