Module: Hangar

Defined in:
lib/hangar.rb,
lib/hangar/engine.rb,
lib/hangar/version.rb,
lib/hangar/constraint.rb,
app/controllers/hangar/records_controller.rb,
app/controllers/hangar/resources_controller.rb

Defined Under Namespace

Classes: Engine, RecordsController, ResourcesController, RouteConstraint

Constant Summary collapse

BadEnvironmentError =
Class.new(StandardError)
VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.do_not_deleteObject



12
13
14
# File 'lib/hangar.rb', line 12

def self.do_not_delete
  Array.wrap(@@do_not_delete)
end

.validate_environmentObject



16
17
18
# File 'lib/hangar.rb', line 16

def validate_environment
  Rails.env.test? or raise BadEnvironmentError, "Hangar should not be used in the #{Rails.env} environment"
end