Module: Assets::Compiler
- Extended by:
- Compiler
- Included in:
- Compiler
- Defined in:
- lib/assets/compiler.rb,
lib/assets/compiler/base.rb,
lib/assets/compiler/checker.rb,
lib/assets/compiler/version.rb,
lib/assets/compiler/javascript.rb,
lib/assets/compiler/plugin/rack.rb,
lib/assets/compiler/plugin/rails.rb
Defined Under Namespace
Modules: Plugin Classes: Base, Checker, InvalidCompiler, Javascript
Constant Summary collapse
- DEFAULTS =
{ :compilers => {}, :always_check => false }
- VERSION =
"0.3"
Instance Attribute Summary collapse
-
#compilers ⇒ Object
Returns the value of attribute compilers.
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
Instance Attribute Details
#compilers ⇒ Object
Returns the value of attribute compilers.
11 12 13 |
# File 'lib/assets/compiler.rb', line 11 def compilers @compilers end |
#config ⇒ Object
Returns the value of attribute config.
11 12 13 |
# File 'lib/assets/compiler.rb', line 11 def config @config end |
Instance Method Details
#compile! ⇒ Object
31 32 33 |
# File 'lib/assets/compiler.rb', line 31 def compile! compilers.each(&:compile!) end |
#init!(options) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/assets/compiler.rb', line 18 def init!() self.config = .reverse_merge(DEFAULTS) self.compilers = [] config[:compilers].each do |key, paths| compilers << Base.create(key, paths) end Plugin::Rails.extend! if defined?(Rails) && config[:always_check] compile! end |