Parent

Class Index [+]

Quicksearch

ActiveSupport::SafeBuffer

Constants

UNSAFE_STRING_METHODS

Public Class Methods

new(*) click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 117
117:     def initialize(*)
118:       @html_safe = true
119:       super
120:     end

Public Instance Methods

+(other) click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 140
140:     def +(other)
141:       dup.concat(other)
142:     end
<<(value) click to toggle source
Alias for: concat
[](*args) click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 100
100:     def [](*args)
101:       return super if args.size < 2
102: 
103:       if html_safe?
104:         new_safe_buffer = super
105:         new_safe_buffer.instance_eval { @html_safe = true }
106:         new_safe_buffer
107:       else
108:         to_str[*args]
109:       end
110:     end
clone_empty() click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 127
127:     def clone_empty
128:       self[0, 0]
129:     end
concat(value) click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 131
131:     def concat(value)
132:       if !html_safe? || value.html_safe?
133:         super(value)
134:       else
135:         super(ERB::Util.h(value))
136:       end
137:     end
Also aliased as: original_concat, <<
encode_with(coder) click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 156
156:     def encode_with(coder)
157:       coder.represent_scalar nil, to_str
158:     end
html_safe?() click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 144
144:     def html_safe?
145:       defined?(@html_safe) && @html_safe
146:     end
initialize_copy(other) click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 122
122:     def initialize_copy(other)
123:       super
124:       @html_safe = other.html_safe?
125:     end
original_concat(value) click to toggle source
Alias for: concat
safe_concat(value) click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 112
112:     def safe_concat(value)
113:       raise SafeConcatError unless html_safe?
114:       original_concat(value)
115:     end
to_param() click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 152
152:     def to_param
153:       to_str
154:     end
to_s() click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 148
148:     def to_s
149:       self
150:     end
to_yaml(*args) click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 160
160:     def to_yaml(*args)
161:       return super() if defined?(YAML::ENGINE) && !YAML::ENGINE.syck?
162:       to_str.to_yaml(*args)
163:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.