Class: PointRb::Actions::CheckProjectPath
- Inherits:
-
Object
- Object
- PointRb::Actions::CheckProjectPath
- Defined in:
- lib/pointrb/actions/check_project_path.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ CheckProjectPath
constructor
A new instance of CheckProjectPath.
Constructor Details
#initialize(app) ⇒ CheckProjectPath
Returns a new instance of CheckProjectPath.
4 5 6 |
# File 'lib/pointrb/actions/check_project_path.rb', line 4 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 12 |
# File 'lib/pointrb/actions/check_project_path.rb', line 8 def call(env) raise PointRb::Exceptions::ProjectPathExists, "Directory '#{env.project.name}' exists." if File.exists? env.project.path @app.call(env) end |