Class: Librarian::Source::Path
- Inherits:
-
Object
- Object
- Librarian::Source::Path
show all
- Includes:
- BasicApi, Local
- Defined in:
- lib/librarian/source/path.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Local
#found_path, #manifest_search_paths, #manifests
included
Methods included from BasicApi
included
Constructor Details
#initialize(environment, path, options) ⇒ Path
Returns a new instance of Path.
17
18
19
20
|
# File 'lib/librarian/source/path.rb', line 17
def initialize(environment, path, options)
self.environment = environment
@path = path
end
|
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
13
14
15
|
# File 'lib/librarian/source/path.rb', line 13
def environment
@environment
end
|
#path ⇒ Object
Returns the value of attribute path.
15
16
17
|
# File 'lib/librarian/source/path.rb', line 15
def path
@path
end
|
Instance Method Details
#==(other) ⇒ Object
26
27
28
29
30
|
# File 'lib/librarian/source/path.rb', line 26
def ==(other)
other &&
self.class == other.class &&
self.path == other.path
end
|
#cache! ⇒ Object
47
48
|
# File 'lib/librarian/source/path.rb', line 47
def cache!
end
|
#filesystem_path ⇒ Object
50
51
52
|
# File 'lib/librarian/source/path.rb', line 50
def filesystem_path
@filesystem_path ||= Pathname.new(path).expand_path(environment.project_path)
end
|
#pinned? ⇒ Boolean
40
41
42
|
# File 'lib/librarian/source/path.rb', line 40
def pinned?
false
end
|
#to_lock_options ⇒ Object
36
37
38
|
# File 'lib/librarian/source/path.rb', line 36
def to_lock_options
{:remote => path}
end
|
#to_s ⇒ Object
22
23
24
|
# File 'lib/librarian/source/path.rb', line 22
def to_s
path.to_s
end
|
#to_spec_args ⇒ Object
32
33
34
|
# File 'lib/librarian/source/path.rb', line 32
def to_spec_args
[path.to_s, {}]
end
|
#unpin! ⇒ Object
44
45
|
# File 'lib/librarian/source/path.rb', line 44
def unpin!
end
|