Module: Rtasklib::Models

Defined in:
lib/rtasklib/models.rb

Overview

Module that holds all domain model related functionality. Primarily Taskrc and TaskModel representations.

Defined Under Namespace

Classes: TWDuration, TaskModel, TaskrcModel, VirtusDuration

Constant Summary

RcBooleans =

Allows us to treat the strings “on”, “off”, “no”, “yes” as Booleans, Which is how TaskWarrior does it.

Virtus.model do |mod|
  mod.coerce = true
  mod.coercer.config.string.boolean_map = {
    'yes' => true,  'on'  => true,
    'no'  => false, 'off' => false }
end