Sha256: 6b00d420c004d90f9284573c8ad9acd78351c590796740655c122f7adeba160e

Contents?: true

Size: 407 Bytes

Versions: 4

Compression:

Stored size: 407 Bytes

Contents

module Foobara
  module RemoteImports
    class AlreadyImported
      def imported
        @imported ||= Set.new
      end

      def <<(manifest)
        imported << to_key(manifest)
      end

      def to_key(manifest)
        [manifest.path.first.to_sym, manifest.reference.to_sym]
      end

      def already_imported?(manifest)
        imported.include?(to_key(manifest))
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foobara-remote-imports-0.0.4 src/foobara/remote_imports/already_imported.rb
foobara-remote-imports-0.0.3 src/foobara/remote_imports/already_imported.rb
foobara-remote-imports-0.0.2 src/foobara/remote_imports/already_imported.rb
foobara-remote-imports-0.0.1 src/foobara/remote_imports/already_imported.rb