Class: Amp::Repositories::Stores::EncodedOpener

Inherits:
Opener show all
Defined in:
lib/amp/repository/store.rb

Overview

EncodedOpener

This opener uses the Stores’ encoding function to modify the filename before it is loaded.

Instance Attribute Summary

Attributes inherited from Opener

#create_mode, #default, #root

Instance Method Summary collapse

Methods inherited from Opener

#initialize, #join, #open_file, #open_hg, #open_up_file, #path, #read

Constructor Details

This class inherits a constructor from Amp::Opener

Instance Method Details

#open(f, mode = "r", &block) ⇒ Object

Overrides the normal opener method to use encoded filenames.



139
140
141
# File 'lib/amp/repository/store.rb', line 139

def open(f, mode="r", &block)
  super(Stores.encode_filename(f), mode, &block)
end