Class: Pipefitter::Compiler
- Inherits:
-
Object
- Object
- Pipefitter::Compiler
- Defined in:
- lib/pipefitter/compiler.rb
Instance Attribute Summary collapse
-
#base_path ⇒ Object
readonly
Returns the value of attribute base_path.
Instance Method Summary collapse
- #compile ⇒ Object
-
#initialize(base_path, options = {}) ⇒ Compiler
constructor
A new instance of Compiler.
Constructor Details
#initialize(base_path, options = {}) ⇒ Compiler
Returns a new instance of Compiler.
5 6 7 8 |
# File 'lib/pipefitter/compiler.rb', line 5 def initialize(base_path, = {}) @options = @base_path = base_path end |
Instance Attribute Details
#base_path ⇒ Object (readonly)
Returns the value of attribute base_path.
3 4 5 |
# File 'lib/pipefitter/compiler.rb', line 3 def base_path @base_path end |
Instance Method Details
#compile ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/pipefitter/compiler.rb', line 10 def compile logger.info "Running `#{compile_command}`..." result = `cd #{base_path} && #{compile_command} 2>&1`.chomp status = $?.to_i == 0 log_result(result, status) status end |