Class: Nydp::Html::Plugin

Inherits:
Object
  • Object
show all
Defined in:
lib/nydp/html.rb

Instance Method Summary collapse

Instance Method Details

#base_pathObject



18
# File 'lib/nydp/html.rb', line 18

def base_path ; relative_path "../lisp/" ; end

#load_rake_tasksObject



20
# File 'lib/nydp/html.rb', line 20

def load_rake_tasks ; end

#loadfilesObject



22
23
24
# File 'lib/nydp/html.rb', line 22

def loadfiles
  Dir.glob(relative_path '../lisp/html-*.nydp').sort
end

#nameObject



12
# File 'lib/nydp/html.rb', line 12

def name ; "Nydp/HTML plugin" ; end

#relative_path(name) ⇒ Object



14
15
16
# File 'lib/nydp/html.rb', line 14

def relative_path name
  File.expand_path(File.join File.dirname(__FILE__), name)
end

#setup(ns) ⇒ Object



30
31
32
33
34
# File 'lib/nydp/html.rb', line 30

def setup ns
  Symbol.mk("textile-to-html",  ns).assign(Nydp::Html::TextileToHtml.instance)
  Symbol.mk("haml-to-html",     ns).assign(Nydp::Html::HamlToHtml.instance)
  Symbol.mk("percent-encode",   ns).assign(Nydp::Html::PercentEncode.instance)
end

#testfilesObject



26
27
28
# File 'lib/nydp/html.rb', line 26

def testfiles
  Dir.glob(relative_path '../lisp/tests/**/*.nydp')
end