Commit 449c26e 1 parent 6a4dd7b commit 449c26e Copy full SHA for 449c26e
File tree 3 files changed +12
-4
lines changed
3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1
1
require 'active_support/core_ext/string/output_safety'
2
- require 'active_support/deprecation'
3
2
require 'active_support/hash_with_indifferent_access'
4
3
require 'active_support/inflector'
5
4
@@ -8,6 +7,7 @@ module Arbo
8
7
9
8
require 'arbo/element'
10
9
require 'arbo/context'
10
+ require 'arbo/deprecator'
11
11
require 'arbo/html/attributes'
12
12
require 'arbo/html/class_list'
13
13
require 'arbo/html/tag'
Original file line number Diff line number Diff line change
1
+ require 'active_support/deprecation'
2
+
3
+ module Arbo
4
+ module_function
5
+ def deprecator # :nodoc:
6
+ @deprecator ||= ActiveSupport ::Deprecation . new
7
+ end
8
+ end
Original file line number Diff line number Diff line change @@ -137,12 +137,12 @@ def inspect
137
137
end
138
138
139
139
def to_str
140
- ActiveSupport :: Deprecation . warn ( "don't rely on implicit conversion of Element to String" )
140
+ Arbo . deprecator . warn ( "don't rely on implicit conversion of Element to String" )
141
141
content
142
142
end
143
143
144
144
def to_s
145
- ActiveSupport :: Deprecation . warn ( "#render_in should be defined for rendering #{ method_owner ( :to_s ) } instead of #to_s" )
145
+ Arbo . deprecator . warn ( "#render_in should be defined for rendering #{ method_owner ( :to_s ) } instead of #to_s" )
146
146
content
147
147
end
148
148
@@ -158,7 +158,7 @@ def render_in_or_to_s(context)
158
158
if method_distance ( :render_in ) <= method_distance ( :to_s )
159
159
render_in ( context )
160
160
else
161
- ActiveSupport :: Deprecation . warn ( "#render_in should be defined for rendering #{ method_owner ( :to_s ) } instead of #to_s" )
161
+ Arbo . deprecator . warn ( "#render_in should be defined for rendering #{ method_owner ( :to_s ) } instead of #to_s" )
162
162
to_s . tap { |s | context . output_buffer << s }
163
163
end
164
164
end
You can’t perform that action at this time.
0 commit comments