Class: Booky::Textile::Load
- Inherits:
-
Object
- Object
- Booky::Textile::Load
- Includes:
- Precompiler
- Defined in:
- lib/booky/textile/load.rb
Instance Method Summary collapse
-
#compile_to(options) ⇒ Object
Replace the path with the contents of the file.
-
#matches(line) ⇒ Object
Does the current line need to be precompiled?.
Methods included from Precompiler
Instance Method Details
#compile_to(options) ⇒ Object
Replace the path with the contents of the file
12 13 14 15 16 17 18 |
# File 'lib/booky/textile/load.rb', line 12 def compile_to begin File.open("#{File.dirname(Booky.source)}/#{}", 'rb:UTF-8') { |f| f.read } rescue raise Booky::LoadError.new "#{File.dirname(Booky.source)}/#{}" end end |
#matches(line) ⇒ Object
Does the current line need to be precompiled?
6 7 8 9 |
# File 'lib/booky/textile/load.rb', line 6 def matches line return false unless line.match /^load./ line.gsub("load.", "").strip end |