Class: Jade::Compiler::Config
- Inherits:
-
Object
- Object
- Jade::Compiler::Config
- Defined in:
- lib/jade/compiler.rb
Instance Attribute Summary collapse
-
#build_dir ⇒ Object
Returns the value of attribute build_dir.
-
#cache_dir ⇒ Object
Returns the value of attribute cache_dir.
-
#project_root ⇒ Object
Returns the value of attribute project_root.
-
#source_root ⇒ Object
Returns the value of attribute source_root.
Instance Method Summary collapse
-
#initialize(project = Project.find) ⇒ Config
constructor
Seeded from jade.json when there is one, so
Jade.setupneeds only what the manifest doesn't say.
Constructor Details
#initialize(project = Project.find) ⇒ Config
Seeded from jade.json when there is one, so Jade.setup needs only
what the manifest doesn't say. A setup block still wins — it runs
after this.
60 61 62 63 64 65 |
# File 'lib/jade/compiler.rb', line 60 def initialize(project = Project.find) @project_root = project&.root || Dir.pwd @source_root = project&.source_root @build_dir = project&.build_dir || ".jade/build" @cache_dir = project&.cache_dir || ".jade/cache" end |
Instance Attribute Details
#build_dir ⇒ Object
Returns the value of attribute build_dir.
55 56 57 |
# File 'lib/jade/compiler.rb', line 55 def build_dir @build_dir end |
#cache_dir ⇒ Object
Returns the value of attribute cache_dir.
55 56 57 |
# File 'lib/jade/compiler.rb', line 55 def cache_dir @cache_dir end |
#project_root ⇒ Object
Returns the value of attribute project_root.
55 56 57 |
# File 'lib/jade/compiler.rb', line 55 def project_root @project_root end |
#source_root ⇒ Object
Returns the value of attribute source_root.
55 56 57 |
# File 'lib/jade/compiler.rb', line 55 def source_root @source_root end |