Class: Litterbox::Habitat::Build
- Inherits:
-
Object
- Object
- Litterbox::Habitat::Build
- Defined in:
- lib/litterbox/habitat/build.rb
Overview
Habitat build
Instance Method Summary collapse
- #build(dir = '.') ⇒ Object
-
#initialize(dir) ⇒ Build
constructor
A new instance of Build.
Constructor Details
#initialize(dir) ⇒ Build
Returns a new instance of Build.
7 8 9 |
# File 'lib/litterbox/habitat/build.rb', line 7 def initialize(dir) @dir = dir end |
Instance Method Details
#build(dir = '.') ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/litterbox/habitat/build.rb', line 11 def build(dir = '.') Open3.popen3("cd #{@dir} && hab pkg build #{dir}") do |_, stderr, _, _| while (line = stderr.gets) puts(line) end end end |