Class: Jade::Compiler::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/jade/compiler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_dirObject

Returns the value of attribute build_dir.



55
56
57
# File 'lib/jade/compiler.rb', line 55

def build_dir
  @build_dir
end

#cache_dirObject

Returns the value of attribute cache_dir.



55
56
57
# File 'lib/jade/compiler.rb', line 55

def cache_dir
  @cache_dir
end

#project_rootObject

Returns the value of attribute project_root.



55
56
57
# File 'lib/jade/compiler.rb', line 55

def project_root
  @project_root
end

#source_rootObject

Returns the value of attribute source_root.



55
56
57
# File 'lib/jade/compiler.rb', line 55

def source_root
  @source_root
end