Module: Todo::Helpers

Extended by:
Helpers
Included in:
Helpers
Defined in:
lib/to-do/helpers/helpers.rb,
lib/to-do/helpers/helpers_CLI.rb,
lib/to-do/helpers/helpers_tasks.rb

Overview

A module that contains helper methods

Defined Under Namespace

Modules: CLI, Tasks

Constant Summary collapse

DATABASE =

The database

Sequel.sqlite Todo::Config[:task_database]

Instance Method Summary collapse

Instance Method Details

#task_namesDataset

Gets a list of the tasks in the working lists

Returns:

  • (Dataset)

    the dataset containing all of the tasks in the working lists



13
14
15
16
17
# File 'lib/to-do/helpers/helpers.rb', line 13

def task_names 
	Helpers::DATABASE[:Tasks].join(:Task_list, :Tasks__Id => :Task_list__Task_Id).join(
	:Lists, :Lists__Id => :Task_list__List_id).select(:Tasks__Id, :Tasks__Task_number, 
	:Tasks__Name, :Tasks__Completed, :Tasks__Priority).filter(:Lists__Name => Config[:working_list_name])
end