Module: ProjectFileWriter
Constant Summary
Constants included from Status
Status::ACTIVE_STATES, Status::INACTIVE_STATES, Status::STATUS_ORDER, Status::STATUS_SYMBOLS, Status::SYMBOLS_STATUS
Instance Method Summary collapse
Methods included from Status
#active, #directory_name, #inactive, #index, #symbol, #with_status
Instance Method Details
#project_file_string ⇒ Object
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/project_persistence.rb', line 45 def project_file_string string = "" @infos.each do |info| string << "# #{info}\n" end @actions.each do |action| string << action.project_file_string << "\n" end string end |
#write(folder) ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/project_persistence.rb', line 34 def write(folder) log "Updating #{folder}/#{@name}.prj" # unless status== :processed # folder += directory_name(@status) # end File.makedirs folder @actions.sort! {|a,b| index(b.status) <=> index(a.status)} write_to_encoded_file("#{folder}/#{@name}.prj", project_file_string) end |