Sha256: c1675f6d7b5442ed70597b2487196438890caa65788980d83c9b9b235f612973

Contents?: true

Size: 729 Bytes

Versions: 19

Compression:

Stored size: 729 Bytes

Contents

module LicenseFinder
  module Activation
    # An Activation reports that a license has been activated for a package, and
    # tracks the source of that information
    Basic = Struct.new(:package, :license)

    class FromDecision < Basic
      def sources
        ["from decision"]
      end
    end

    class FromSpec < Basic
      def sources
        ["from spec"]
      end
    end

    class FromFiles < Basic
      def initialize(package, license, files)
        super(package, license)
        @files = files
      end

      attr_reader :files

      def sources
        files.map { |file| "from file '#{file.path}'" }
      end
    end

    class None < Basic
      def sources
        []
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
license_finder-3.0.4 lib/license_finder/packages/activation.rb
license_finder-3.0.2 lib/license_finder/packages/activation.rb
license_finder-3.0.1 lib/license_finder/packages/activation.rb
license_finder-3.0.0 lib/license_finder/packages/activation.rb
license_finder-2.1.2 lib/license_finder/packages/activation.rb
license_finder-2.1.1 lib/license_finder/packages/activation.rb
license_finder-2.1.0 lib/license_finder/packages/activation.rb
license_finder-2.1.0.rc9 lib/license_finder/packages/activation.rb
license_finder-2.1.0.rc8 lib/license_finder/packages/activation.rb
license_finder-2.1.0.rc7 lib/license_finder/packages/activation.rb
license_finder-2.1.0.rc6 lib/license_finder/packages/activation.rb
license_finder-2.1.0.rc5 lib/license_finder/packages/activation.rb
license_finder-2.1.0.rc4 lib/license_finder/packages/activation.rb
license_finder-2.1.0.rc3 lib/license_finder/packages/activation.rb
license_finder-2.1.0.rc2 lib/license_finder/packages/activation.rb
license_finder-2.1.0.rc1 lib/license_finder/packages/activation.rb
license_finder-2.0.4 lib/license_finder/packages/activation.rb
license_finder-2.0.3 lib/license_finder/packages/activation.rb
license_finder-2.0.2 lib/license_finder/packages/activation.rb