Sha256: 4fa00c7a079d2bbd81d411b03e55f61ab12a5869f790ecce23d790c5ef626353

Contents?: true

Size: 512 Bytes

Versions: 13

Compression:

Stored size: 512 Bytes

Contents

# encoding: utf-8
module LocalPac
  class LocalStorage
    private

    attr_reader :storage, :null_file

    public

    def initialize(storage = GitRepository.new(LocalPac.config.local_storage), null_file = NullPacFile.new )
      @storage   = storage
      @null_file = null_file
    end

    def find(name)
      name = name.sub(/.pac$/, '').camelize.downcase.to_sym
      LocalPac.ui_logger.debug "Using the following name to find pac file: \":#{name}\"."
      storage[name] || null_file
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
local_pac-0.1.13 lib/local_pac/local_storage.rb
local_pac-0.1.11 lib/local_pac/local_storage.rb
local_pac-0.1.10 lib/local_pac/local_storage.rb
local_pac-0.1.9 lib/local_pac/local_storage.rb
local_pac-0.1.8 lib/local_pac/local_storage.rb
local_pac-0.1.7 lib/local_pac/local_storage.rb
local_pac-0.1.6 lib/local_pac/local_storage.rb
local_pac-0.1.5 lib/local_pac/local_storage.rb
local_pac-0.1.4 lib/local_pac/local_storage.rb
local_pac-0.1.3 lib/local_pac/local_storage.rb
local_pac-0.1.2 lib/local_pac/local_storage.rb
local_pac-0.1.1 lib/local_pac/local_storage.rb
local_pac-0.1.0 lib/local_pac/local_storage.rb