class Todo::Options
Options
for default preferences and library settings that can be customized by clients of the gem.
Attributes
maintain_field_order[RW]
PENDING
Whether or not to preserve original field order for roundtripping.
@return [Boolean]
require_completed_on[RW]
Require all done tasks to have a `completed_on` date. True by default.
-
When `true`, tasks with invalid dates are considered not done.
-
When `false`, tasks starting with `x ` are considered done.
Example:
Todo.customize do |opts| opts.require_completed_on = false end task = Todo::Task.new("x This is done!") task.done? # => true
@return [Boolean]
Public Class Methods
new()
click to toggle source
# File lib/todo/options.rb, line 29 def initialize reset end
Public Instance Methods
reset()
click to toggle source
Reset to defaults.
# File lib/todo/options.rb, line 34 def reset @require_completed_on = true @maintain_field_order = false end