Module: Buildr::Compiler
- Defined in:
- lib/buildr/core/compile.rb,
lib/buildr/java/compiler.rb
Overview
Defined Under Namespace
Class Method Summary collapse
-
.add(compiler) ⇒ Object
(also: <<)
Adds a compiler to the list of supported compiler.
-
.compilers ⇒ Object
Returns a list of available compilers.
-
.has?(name) ⇒ Boolean
Returns true if the specified compiler exists.
-
.select(name) ⇒ Object
Select a compiler by its name.
Class Method Details
.add(compiler) ⇒ Object Also known as: <<
43 44 45 46 |
# File 'lib/buildr/core/compile.rb', line 43 def add(compiler) @compilers ||= [] @compilers |= [compiler] end |
.compilers ⇒ Object
Returns a list of available compilers.
50 51 52 |
# File 'lib/buildr/core/compile.rb', line 50 def compilers @compilers ||= [] end |
.has?(name) ⇒ Boolean
Returns true if the specified compiler exists.
30 31 32 |
# File 'lib/buildr/core/compile.rb', line 30 def has?(name) compilers.any? { |compiler| compiler.to_sym == name.to_sym } end |
.select(name) ⇒ Object
Select a compiler by its name.
35 36 37 |
# File 'lib/buildr/core/compile.rb', line 35 def select(name) compilers.detect { |compiler| compiler.to_sym == name.to_sym } end |