Class: PDK::Template::Fetcher::Local
- Inherits:
-
AbstractFetcher
- Object
- AbstractFetcher
- PDK::Template::Fetcher::Local
- Defined in:
- lib/pdk/template/fetcher/local.rb
Instance Attribute Summary
Attributes inherited from AbstractFetcher
#fetched, #metadata, #path, #temporary, #uri
Class Method Summary collapse
-
.fetchable?(_uri, _options = {}) ⇒ Boolean
Whether the passed uri is fetchable.
Instance Method Summary collapse
Methods inherited from AbstractFetcher
Constructor Details
This class inherits a constructor from PDK::Template::Fetcher::AbstractFetcher
Class Method Details
.fetchable?(_uri, _options = {}) ⇒ Boolean
Whether the passed uri is fetchable. This is a catch-all and all URIs are considered on-disk already.
12 13 14 |
# File 'lib/pdk/template/fetcher/local.rb', line 12 def self.fetchable?(_uri, = {}) true end |
Instance Method Details
#fetch! ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/pdk/template/fetcher/local.rb', line 17 def fetch! return if fetched super @path = uri.shell_path @temporary = false @metadata['template-url'] = uri. end |