Sha256: 0a306f38b3e14bd39232fe07a847adafc0eef5e1e9e25a1c529a56d32bbdedb9

Contents?: true

Size: 473 Bytes

Versions: 6

Compression:

Stored size: 473 Bytes

Contents

class Licensee
  class Project

    attr_reader :base_path

    def initialize(base_path)
      raise "Invalid directory" unless File.directory?(base_path)
      @base_path = File.expand_path(base_path)
    end

    def license_file
      @license_file ||= Licensee::LicenseFile.find(base_path)
    end

    def matches
      @matches ||= license_file.matches if license_file
    end

    def license
      @license ||= license_file.match if license_file
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
licensee-0.2.0 lib/licensee/project.rb
licensee-0.1.1 lib/licensee/project.rb
licensee-0.1.0 lib/licensee/project.rb
licensee-0.0.3 lib/licensee/project.rb
licensee-0.0.2 lib/licensee/project.rb
licensee-0.0.1 lib/licensee/project.rb