Class: TodoLint::Judge

Inherits:
Object
  • Object
show all
Defined in:
lib/todo_lint/judge.rb

Overview

Is this todo worth bothering the user about? Judge the todo, and charge it with a crime if necessary

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(todo) ⇒ Judge

Accept and judge a todo

Examples:

Judge.new(todo)


17
18
19
20
# File 'lib/todo_lint/judge.rb', line 17

def initialize(todo)
  @todo = todo
  @charge = make_charge
end

Instance Attribute Details

#chargeString, NilClass (readonly)

The problem, if any, with this todo

Examples:

judge.charge #=> "The todo is overly dramatic"

Returns:

  • (String)

    if the todo has something going on with it

  • (NilClass)

    if the todo is fine



11
12
13
# File 'lib/todo_lint/judge.rb', line 11

def charge
  @charge
end