Class: PointRb::Actions::CheckIfPointRbHasAlreadyBeenInitialized

Inherits:
Object
  • Object
show all
Defined in:
lib/pointrb/actions/check_if_pointrb_has_already_been_initialized.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ CheckIfPointRbHasAlreadyBeenInitialized

Returns a new instance of CheckIfPointRbHasAlreadyBeenInitialized.



4
5
6
# File 'lib/pointrb/actions/check_if_pointrb_has_already_been_initialized.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_if_pointrb_has_already_been_initialized.rb', line 8

def call(env)
  raise Exceptions::PointRbWasAlreadInitialized , "This system has already been setup." if File.exists? env.layout_directory

  @app.call(env)
end