lib/tasks.rb
# == add task to todos
# === Params
#- task_names : add task name list
add task to todos
Params
task_names : add task name list
add task to todos Params task_names : add task name list
def todos_to_doings
        tmp_todos = todos
        return if finish?(tmp_todos)
        deleted_todos = tmp_todos.dup
        deleted_todos.delete_at 0
        File.open(TuduPaths::TUDU_TODOS_FILE_PATH, 'w:UTF-8') do |f|
          deleted_todos.each { |task|f.puts task.name }
        end
        File.open(TuduPaths::TUDU_DOINGS_FILE_PATH, 'w:UTF-8') do |f|
          f.puts tmp_todos.first.name
        end
      end
def todos_to_doings tmp_todos = todos return if finish? ( tmp_todos ) deleted_todos = tmp_todos . dup deleted_todos . delete_at 0 File . open ( TuduPaths :: TUDU_TODOS_FILE_PATH , 'w:UTF-8' ) do | f | deleted_todos . each { | task | f . puts task . name } end File . open ( TuduPaths :: TUDU_DOINGS_FILE_PATH , 'w:UTF-8' ) do | f | f . puts tmp_todos . first . name end end
add task to todos
 Params
task_names : add task name list
add task to todos Params task_names : add task name list