Class: Confinement::Config::Compiler

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root:) {|_self| ... } ⇒ Compiler

Returns a new instance of Compiler.

Yields:

  • (_self)

Yield Parameters:



182
183
184
185
186
187
# File 'lib/confinement.rb', line 182

def initialize(root:)
  @root = root
  yield(self)

  self.output_root ||= default_output_root
end

Instance Attribute Details

#output_assetsObject

Returns the value of attribute output_assets.



190
191
192
# File 'lib/confinement.rb', line 190

def output_assets
  @output_assets
end

#output_directory_indexObject

Returns the value of attribute output_directory_index.



191
192
193
# File 'lib/confinement.rb', line 191

def output_directory_index
  @output_directory_index
end

#output_rootObject

Returns the value of attribute output_root.



189
190
191
# File 'lib/confinement.rb', line 189

def output_root
  @output_root
end

Instance Method Details

#default_output_rootObject



201
202
203
# File 'lib/confinement.rb', line 201

def default_output_root
  "tmp/build-#{Confinement.env}"
end

#output_assets_pathObject



197
198
199
# File 'lib/confinement.rb', line 197

def output_assets_path
  @root.concat(output_root, output_assets).cleanpath.expand_path
end

#output_root_pathObject



193
194
195
# File 'lib/confinement.rb', line 193

def output_root_path
  @root.concat(output_root).cleanpath.expand_path
end