Sha256: b2171f71fdfe74f1f29243cf83e436dffa517d1e742d1896a19f00d265870536

Contents?: true

Size: 681 Bytes

Versions: 2

Compression:

Stored size: 681 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.get_path
      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

2 entries across 2 versions & 1 rubygems

Version Path
nicht-0.1.8 lib/nicht.rb
nicht-0.1.7 lib/nicht.rb