Class: DakeScheme::Local
Constant Summary collapse
- PATTERN =
['local:']
Instance Attribute Summary
Attributes inherited from Scheme
Instance Method Summary collapse
- #exist? ⇒ Boolean
-
#initialize(scheme_part, path_part, step) ⇒ Local
constructor
A new instance of Local.
- #mtime ⇒ Object
Methods inherited from Scheme
Constructor Details
#initialize(scheme_part, path_part, step) ⇒ Local
Returns a new instance of Local.
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/dake/scheme.rb', line 36 def initialize(scheme_part, path_part, step) if path_part.start_with? '/' @path = path_part @src = Pathname.new(path_part).relative_path_from(step.context['BASE']) else @path = File.(path_part, step.context['BASE']) @src = path_part end @step = step end |
Instance Method Details
#exist? ⇒ Boolean
51 52 53 |
# File 'lib/dake/scheme.rb', line 51 def exist? File.exist?(@path) end |
#mtime ⇒ Object
47 48 49 |
# File 'lib/dake/scheme.rb', line 47 def mtime File.mtime(@path) end |