Sha256: d78c25c66af1c97da76178d50f56fb92b03da1f3b3b4c8f93ed3f4137502435e

Contents?: true

Size: 378 Bytes

Versions: 2

Compression:

Stored size: 378 Bytes

Contents

module Nicht
  class Settings
    FILENAME = '~/.nichtrc'.freeze

    def initialize(path)
      @path = File.expand_path path
    end

    def get_path
      raise Nicht::SettingsNotFound unless File.exist? @path
      projects_path = File.expand_path(File.read(@path))
      raise Nicht::SettingsNotValid unless File.exist? projects_path
      projects_path
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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