Module: Booky::Textile
- Defined in:
- lib/booky/textile.rb,
lib/booky/textile/load.rb,
lib/booky/textile/table.rb,
lib/booky/textile/source.rb,
lib/booky/textile/precompiler.rb
Defined Under Namespace
Modules: Precompiler Classes: Load, Source, Table
Constant Summary collapse
- @@base =
nil
Class Method Summary collapse
- .base ⇒ Object
- .precompile(textile = Booky.source) ⇒ Object
-
.precompilers ⇒ Object
Get the precompilers.
-
.precompilers=(value) ⇒ Object
Set the precompilers.
Class Method Details
.base ⇒ Object
34 35 36 |
# File 'lib/booky/textile.rb', line 34 def self.base @@base end |
.precompile(textile = Booky.source) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/booky/textile.rb', line 10 def self.precompile textile = Booky.source puts "\n-> Precompiling Textile".green raise "File #{Booky.source} not found. Sorry".red if !File.exists?("#{Booky.source}") # Open Textile file @@base = File.(textile) @textile = File.open(textile, 'rb:UTF-8') { |f| f.read } # Apply Precompilers @precompilers.each { |precompiler| @textile = precompiler.apply(@textile) } @textile end |
.precompilers ⇒ Object
Get the precompilers
30 31 32 |
# File 'lib/booky/textile.rb', line 30 def self.precompilers @precompilers end |
.precompilers=(value) ⇒ Object
Set the precompilers
25 26 27 |
# File 'lib/booky/textile.rb', line 25 def self.precompilers=(value) @precompilers = value end |