Class: PGit::CurrentProject
- Inherits:
-
Object
- Object
- PGit::CurrentProject
show all
- Defined in:
- lib/pgit/current_project.rb,
lib/pgit/current_project/validator.rb,
lib/pgit/current_project/no_paths_match_working_dir_error.rb
Defined Under Namespace
Classes: NoPathsMatchWorkingDirError, Validator
Instance Method Summary
collapse
Constructor Details
Returns a new instance of CurrentProject.
11
12
13
|
# File 'lib/pgit/current_project.rb', line 11
def initialize(config_yaml)
@current_project = find_current_project(config_yaml)
end
|
Instance Method Details
#api_token ⇒ Object
24
25
26
|
# File 'lib/pgit/current_project.rb', line 24
def api_token
@current_project["api_token"]
end
|
#id ⇒ Object
20
21
22
|
# File 'lib/pgit/current_project.rb', line 20
def id
@current_project["id"]
end
|
#pwd ⇒ Object
15
16
17
18
|
# File 'lib/pgit/current_project.rb', line 15
def pwd
project_path = @current_project["path"]
File.expand_path(project_path, __FILE__)
end
|