Class: PGit::CurrentProject
- Inherits:
-
Object
- Object
- PGit::CurrentProject
- Extended by:
- Forwardable
- Defined in:
- lib/pgit/current_project.rb,
lib/pgit/current_project/validator.rb
Defined Under Namespace
Classes: Validator
Instance Method Summary collapse
-
#initialize(configuration) ⇒ CurrentProject
constructor
A new instance of CurrentProject.
Constructor Details
#initialize(configuration) ⇒ CurrentProject
Returns a new instance of CurrentProject.
12 13 14 15 16 17 18 |
# File 'lib/pgit/current_project.rb', line 12 def initialize(configuration) @current = configuration.projects.find do |p| File.(p.path) == Dir.pwd end raise PGit::Error::User, "Current Project does not exist. See `pgit proj add -h`" unless @current end |