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.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
-
#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.
50 51 52 53 54 55 56 57 58 |
# File 'lib/fpm/fry/source/dir.rb', line 50 def initialize( url, = {} ) @url = URI(url) if @url.relative? @url.path = File.(@url.path) end @logger = .fetch(:logger){ Cabin::Channel.get } @file_map = [:file_map] @to = [:to] end |
Instance Attribute Details
#file_map ⇒ Object (readonly)
Returns the value of attribute file_map.
48 49 50 |
# File 'lib/fpm/fry/source/dir.rb', line 48 def file_map @file_map end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
48 49 50 |
# File 'lib/fpm/fry/source/dir.rb', line 48 def logger @logger end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
48 49 50 |
# File 'lib/fpm/fry/source/dir.rb', line 48 def to @to end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
48 49 50 |
# File 'lib/fpm/fry/source/dir.rb', line 48 def url @url end |
Class Method Details
.guess(url) ⇒ Object
17 18 19 |
# File 'lib/fpm/fry/source/dir.rb', line 17 def self.guess( url ) Source::guess_regex(REGEX, url) end |
.name ⇒ Object
13 14 15 |
# File 'lib/fpm/fry/source/dir.rb', line 13 def self.name :dir end |