Module: Mech
Defined Under Namespace
Modules: Configurator
Classes: Compiler, Config, PathLoader, Producer
Constant Summary
collapse
- VERSION =
[ 0, 0, 1 ]
Class Method Summary
collapse
config, init
Class Method Details
.auto_path(path) ⇒ Object
21
22
23
|
# File 'lib/mech.rb', line 21
def self.auto_path(path)
File.join(File.dirname(__FILE__), path)
end
|
.compile(params = {}) ⇒ Object
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# File 'lib/mech.rb', line 52
def compile(params = {})
producer_name = params[:producer_name] || config.producer
compile_format = params[:compiler_format] || config.compiler
config_path = params[:config_path]
init(config_path) if config_path
loader = Mech::PathLoader.new(config)
producer = Mech::Producer.const_get(producer_name).new(loader.paths)
compiler = Mech::Compiler.build(compile_format)
data = producer.produce
compiler.compile(data)
end
|