Class: Babl::Config
- Inherits:
-
Object
- Object
- Babl::Config
- Defined in:
- lib/babl.rb
Overview
There is basically two ways to use BABL: the Rails way, and the clean way.
Rails way
-
BABL detects Rails and integrates with it automatically (only if BABL is required AFTER Rails).
-
BABL configuration is global (defined via Babl.configure).
-
Global configuration is also used by:
Babl.template Babl.compile Babl.source
Clean way
-
You can decide not to use global configuration. It will result in more verbosity but it protects you from global settings.
-
Equivalences:
Babl.template ==> Babl::Template.new Babl.compile ==> Babl::Template#compile Babl.source ==> Babl::Template#source
Instance Attribute Summary collapse
-
#cache_templates ⇒ Object
No practical use outside Bannerman today.
-
#lookup_context ⇒ Object
No practical use outside Bannerman today.
-
#preloader ⇒ Object
No practical use outside Bannerman today.
-
#pretty ⇒ Object
No practical use outside Bannerman today.
-
#using ⇒ Object
No practical use outside Bannerman today.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
34 35 36 37 38 39 40 |
# File 'lib/babl.rb', line 34 def initialize @preloader = Rendering::NoopPreloader @pretty = true @cache_templates = false @lookup_context = nil @using = [] end |
Instance Attribute Details
#cache_templates ⇒ Object
No practical use outside Bannerman today.
28 29 30 |
# File 'lib/babl.rb', line 28 def cache_templates @cache_templates end |
#lookup_context ⇒ Object
No practical use outside Bannerman today.
28 29 30 |
# File 'lib/babl.rb', line 28 def lookup_context @lookup_context end |
#preloader ⇒ Object
No practical use outside Bannerman today.
28 29 30 |
# File 'lib/babl.rb', line 28 def preloader @preloader end |
#pretty ⇒ Object
No practical use outside Bannerman today.
28 29 30 |
# File 'lib/babl.rb', line 28 def pretty @pretty end |
#using ⇒ Object
No practical use outside Bannerman today.
28 29 30 |
# File 'lib/babl.rb', line 28 def using @using end |