Class: PGit::CurrentProject

Inherits:
Object
  • Object
show all
Defined in:
lib/pgit/current_project.rb

Instance Method Summary collapse

Constructor Details

#initialize(config_yaml) ⇒ CurrentProject

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_tokenObject



24
25
26
# File 'lib/pgit/current_project.rb', line 24

def api_token
  @current_project["api_token"]
end

#idObject



20
21
22
# File 'lib/pgit/current_project.rb', line 20

def id
  @current_project["id"]
end

#pwdObject



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