Class: Builder
- Inherits:
-
Object
- Object
- Builder
- Defined in:
- lib/sheldon/builder.rb
Instance Method Summary collapse
Instance Method Details
#build(abs_build_path) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/sheldon/builder.rb', line 4 def build(abs_build_path) entries = Dir.glob(abs_build_path + "/*").sort master_content = entries.inject("") do |buffer, entry| is_config?(entry) ? add_entry_to_buffer(entry, buffer) : buffer end if master_content.empty? return false else master_path = File.join(abs_build_path, "config") File.open(master_path, "w") { |f| f.write(master_content) } return true end end |