Sha256: ef9919533fcb949daf3a2cfc77de9c8b42deade91c68ef41e216b76546863b81

Contents?: true

Size: 357 Bytes

Versions: 6

Compression:

Stored size: 357 Bytes

Contents

module LicenseFinder
  class LicenseAlias < Sequel::Model
    def self.named(name)
      find_or_create(name: name)
    end

    def initialize(*args)
      super
      self.url = LicenseUrl.find_by_name name
    end

    def whitelisted?
      !!(config.whitelisted?(name))
    end

    private

    def config
      LicenseFinder.config
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
license_finder-1.0.0.0 lib/license_finder/tables/license_alias.rb
license_finder-1.0.0.0-java lib/license_finder/tables/license_alias.rb
license_finder-0.9.5.1-java lib/license_finder/tables/license_alias.rb
license_finder-0.9.5.1 lib/license_finder/tables/license_alias.rb
license_finder-0.9.5 lib/license_finder/tables/license_alias.rb
license_finder-0.9.5-java lib/license_finder/tables/license_alias.rb