Sha256: 75e09d6cdefb8372c17d0953f787bb3a6e0076c776988bfaa78fd58f47f7fecc
Contents?: true
Size: 489 Bytes
Versions: 13
Compression:
Stored size: 489 Bytes
Contents
module LicenseFinder class PossibleLicenseFile def initialize(path, options = {}) @path = Pathname(path) @logger = options[:logger] end def path @path.to_s end def license License.find_by_text(text) end def text if @path.exist? @text ||= (@path.respond_to?(:binread) ? @path.binread : @path.read) else @logger.info('ERROR', "#{@path} does not exists", color: :red) '' end end end end
Version data entries
13 entries across 13 versions & 1 rubygems