Class: Indocker::Repositories::Local

Inherits:
Abstract
  • Object
show all
Defined in:
lib/indocker/repositories/local.rb

Instance Attribute Summary collapse

Attributes inherited from Abstract

#name

Instance Method Summary collapse

Methods inherited from Abstract

#initialize, #is_git?, #is_local?, #is_no_sync?

Methods included from Concerns::Inspectable

#inspect

Constructor Details

This class inherits a constructor from Indocker::Repositories::Abstract

Instance Attribute Details

#root_pathObject (readonly)

Returns the value of attribute root_path.



2
3
4
# File 'lib/indocker/repositories/local.rb', line 2

def root_path
  @root_path
end

Instance Method Details

#clone_pathObject



17
18
19
# File 'lib/indocker/repositories/local.rb', line 17

def clone_path
  "/tmp/#{Indocker.configuration.name}/repositories/local/#{project_name}"
end

#project_nameObject



9
10
11
# File 'lib/indocker/repositories/local.rb', line 9

def project_name
  root_path.split('/').last
end

#setup(root_path) ⇒ Object



4
5
6
7
# File 'lib/indocker/repositories/local.rb', line 4

def setup(root_path)
  @root_path = File.expand_path(root_path)
  self
end