Class: Rhinestone::Injector
- Inherits:
-
Object
- Object
- Rhinestone::Injector
- Includes:
- Dependor::AutoInject
- Defined in:
- lib/rhinestone/injector.rb
Instance Method Summary collapse
- #cache_backend ⇒ Object
- #hostname ⇒ Object
- #important_headers ⇒ Object
-
#initialize(opts = {}) ⇒ Injector
constructor
A new instance of Injector.
Constructor Details
#initialize(opts = {}) ⇒ Injector
Returns a new instance of Injector.
6 7 8 |
# File 'lib/rhinestone/injector.rb', line 6 def initialize(opts = {}) @cache_path = opts.fetch(:cache_path, '/tmp/rhinestone/cache') end |
Instance Method Details
#cache_backend ⇒ Object
10 11 12 |
# File 'lib/rhinestone/injector.rb', line 10 def cache_backend @cache_backend ||= FilesystemCacheBackend.new(@cache_path) end |
#hostname ⇒ Object
14 15 16 |
# File 'lib/rhinestone/injector.rb', line 14 def hostname "rubygems.org" end |
#important_headers ⇒ Object
18 19 20 |
# File 'lib/rhinestone/injector.rb', line 18 def important_headers %w{Content-Type Cache-Control ETag Set-Cookie} end |