4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/flucti/utilities/core_ext.rb', line 4
def self.apply!
String.class_eval do
def constantize
split('::').inject(Object) { |mod, name| mod.const_get(name) }
end
end
Pathname.class_eval do
alias_method :/, :+
protected :+
end
ActiveSupport::Dependencies.unhook!
ActiveSupport::Dependencies::ClassConstMissing.module_eval do
def const_missing(*args)
super
end
end
ActiveSupport::Inflector.inflections do |inflect|
inflect.singular('databases', 'database')
end
WebService::RemoteCollection.class_eval do
include ConnectionErrorHandling
end
end
|