aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/buffers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/buffers.rb')
-rw-r--r--actionpack/lib/action_view/buffers.rb49
1 files changed, 0 insertions, 49 deletions
diff --git a/actionpack/lib/action_view/buffers.rb b/actionpack/lib/action_view/buffers.rb
deleted file mode 100644
index 361a0dccbe..0000000000
--- a/actionpack/lib/action_view/buffers.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'active_support/core_ext/string/output_safety'
-
-module ActionView
- class OutputBuffer < ActiveSupport::SafeBuffer #:nodoc:
- def initialize(*)
- super
- encode!
- end
-
- def <<(value)
- return self if value.nil?
- super(value.to_s)
- end
- alias :append= :<<
-
- def safe_concat(value)
- return self if value.nil?
- super(value.to_s)
- end
- alias :safe_append= :safe_concat
- end
-
- class StreamingBuffer #:nodoc:
- def initialize(block)
- @block = block
- end
-
- def <<(value)
- value = value.to_s
- value = ERB::Util.h(value) unless value.html_safe?
- @block.call(value)
- end
- alias :concat :<<
- alias :append= :<<
-
- def safe_concat(value)
- @block.call(value.to_s)
- end
- alias :safe_append= :safe_concat
-
- def html_safe?
- true
- end
-
- def html_safe
- self
- end
- end
-end