Module: Consul::Controller
- Defined in:
- lib/consul/controller.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary
collapse
Class Method Details
.ensure_power_initializer_present? ⇒ Boolean
14
15
16
|
# File 'lib/consul/controller.rb', line 14
def self.ensure_power_initializer_present?
['development', 'test', 'cucumber', 'in_memory'].include?(Rails.env)
end
|
.included(base) ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/consul/controller.rb', line 4
def self.included(base)
base.send :include, InstanceMethods
base.send :extend, ClassMethods
if ensure_power_initializer_present?
base.before_filter :ensure_power_initializer_present
end
end
|