Module: Glyptodont

Defined in:
lib/glyptodont.rb,
lib/glyptodont/checker.rb,
lib/glyptodont/options.rb,
lib/glyptodont/version.rb,
lib/glyptodont/formatting.rb,
lib/glyptodont/checkers/age.rb,
lib/glyptodont/configuration.rb,
lib/glyptodont/todo_researcher.rb,
lib/glyptodont/checkers/counter.rb

Overview

String formatting methods

Defined Under Namespace

Modules: Checkers Classes: Checker, Configuration, Options, TodoResearcher

Constant Summary collapse

VERSION =
"0.3.0"

Class Method Summary collapse

Class Method Details

.checkObject



7
8
9
# File 'lib/glyptodont.rb', line 7

def self.check
  Checker.new(ARGV).check
end

.format_todo(todo) ⇒ Object



14
15
16
# File 'lib/glyptodont/formatting.rb', line 14

def format_todo(todo)
  format("%<file>s:%<line>s: %<text>s -- %<name>s @ %<time>s", todo)
end

.pluralize(items, text) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/glyptodont/formatting.rb', line 6

def pluralize(items, text)
  if items == 1
    "1 #{text}"
  else
    "#{items} #{text}s"
  end
end