Sha256: 88e446d435ed3fd8bd5d555387b818868e6864db3f7b3cb3e9ef452c07bc3585
Contents?: true
Size: 984 Bytes
Versions: 1
Compression:
Stored size: 984 Bytes
Contents
# frozen_string_literal: true require_relative "glyptodont/checkers/age" require_relative "glyptodont/checkers/counter" require_relative "glyptodont/configuration" require_relative "glyptodont/formatting" require_relative "glyptodont/options" require_relative "glyptodont/todo_researcher" require "forwardable" # This is where the magic happens module Glyptodont class << self def check @options = Options.new @configuration = Configuration.new(directory) todos = TodoResearcher.new(directory, ignore).research checks = [ Checkers::Counter.new(todos: todos, threshold: threshold), Checkers::Age.new(todos: todos, threshold: max_age_in_days) ].freeze checks.each { |check| puts check.check } checks.all?(&:passed?) end attr_reader :configuration, :options extend Forwardable def_delegator :@configuration, :ignore def_delegators :@options, :directory, :threshold, :max_age_in_days end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
glyptodont-0.1.0 | lib/glyptodont.rb |