Sha256: 3c88f67965780d51215b85da8402ba994097b78c404e5af7dd0fd2d134bbeb5f

Contents?: true

Size: 679 Bytes

Versions: 4

Compression:

Stored size: 679 Bytes

Contents

require 'nicht/exceptions'
require 'nicht/settings'
require 'nicht/stats'
require 'nicht/version'

module Nicht
  class << self
    def run(path, search = nil)
      settings = Nicht::Settings.new path
      begin
        projects_path = settings.valid?
      rescue Nicht::SettingsNotFound
        puts 'Settings not found. You should create .nichtrc with settings in your home directory.'
      rescue Nicht::SettingsNotValid
        puts 'Settings are not valid.'
      else
        render_results(projects_path, search)
      end
    end

    def render_results(projects_path, search)
      stats = Nicht::Stats.new projects_path, search
      stats.render
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nicht-0.1.4 lib/nicht.rb
nicht-0.1.3 lib/nicht.rb
nicht-0.1.2 lib/nicht.rb
nicht-0.1.1 lib/nicht.rb