Class: Make

Inherits:
Object
  • Object
show all
Defined in:
lib/aml/make.rb

Instance Method Summary collapse

Constructor Details

#initialize(structure) ⇒ Make

Returns a new instance of Make.



2
3
4
5
6
7
8
9
10
11
# File 'lib/aml/make.rb', line 2

def initialize(structure)
	makeFile = File.join(AbstractMarkupLanguage::Base.basePath,AbstractMarkupLanguage::Base.makeFile)
	File.open(makeFile, 'w'){|file|
		struct_count = structure.count-1
		structure.each_with_index do |line,index|
			new_line = (index < struct_count) ? $/ : ""
			file.write(line+new_line) if line.strip.length > 0
		end
	}
end