Class: FPM::Fry::Source::Dir
- Inherits:
-
Object
- Object
- FPM::Fry::Source::Dir
- Defined in:
- lib/fpm/fry/source/dir.rb
Defined Under Namespace
Classes: Cache
Constant Summary collapse
- REGEX =
%r!\A(?:file:|/|\.)!
Instance Attribute Summary collapse
-
#file_map ⇒ Object
readonly
Returns the value of attribute file_map.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
- #build_cache(_) ⇒ Object
-
#initialize(url, options = {}) ⇒ Dir
constructor
A new instance of Dir.
Constructor Details
#initialize(url, options = {}) ⇒ Dir
Returns a new instance of Dir.
46 47 48 49 50 51 52 53 |
# File 'lib/fpm/fry/source/dir.rb', line 46 def initialize( url, = {} ) @url = URI(url) if @url.relative? @url.path = File.(@url.path) end @logger = .fetch(:logger){ Cabin::Channel.get } @file_map = .fetch(:file_map){ {'' => ''} } end |
Instance Attribute Details
#file_map ⇒ Object (readonly)
Returns the value of attribute file_map.
44 45 46 |
# File 'lib/fpm/fry/source/dir.rb', line 44 def file_map @file_map end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
44 45 46 |
# File 'lib/fpm/fry/source/dir.rb', line 44 def logger @logger end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
44 45 46 |
# File 'lib/fpm/fry/source/dir.rb', line 44 def url @url end |
Class Method Details
.guess(url) ⇒ Object
13 14 15 |
# File 'lib/fpm/fry/source/dir.rb', line 13 def self.guess( url ) Source::guess_regex(REGEX, url) end |
.name ⇒ Object
9 10 11 |
# File 'lib/fpm/fry/source/dir.rb', line 9 def self.name :dir end |