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 118
118:     def initialize(*)
119:       @html_safe = true
120:       super
121:     end

Public Instance Methods

+(other) click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 141
141:     def +(other)
142:       dup.concat(other)
143:     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 101
101:     def [](*args)
102:       return super if args.size < 2
103: 
104:       if html_safe?
105:         new_safe_buffer = super
106:         new_safe_buffer.instance_eval { @html_safe = true }
107:         new_safe_buffer
108:       else
109:         to_str[*args]
110:       end
111:     end
clone_empty() click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 128
128:     def clone_empty
129:       self[0, 0]
130:     end
concat(value) click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 132
132:     def concat(value)
133:       if !html_safe? || value.html_safe?
134:         super(value)
135:       else
136:         super(ERB::Util.h(value))
137:       end
138:     end
Also aliased as: original_concat, <<
encode_with(coder) click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 157
157:     def encode_with(coder)
158:       coder.represent_scalar nil, to_str
159:     end
html_safe?() click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 145
145:     def html_safe?
146:       defined?(@html_safe) && @html_safe
147:     end
initialize_copy(other) click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 123
123:     def initialize_copy(other)
124:       super
125:       @html_safe = other.html_safe?
126:     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 113
113:     def safe_concat(value)
114:       raise SafeConcatError unless html_safe?
115:       original_concat(value)
116:     end
to_param() click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 153
153:     def to_param
154:       to_str
155:     end
to_s() click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 149
149:     def to_s
150:       self
151:     end
to_yaml(*args) click to toggle source
     # File lib/active_support/core_ext/string/output_safety.rb, line 161
161:     def to_yaml(*args)
162:       return super() if defined?(YAML::ENGINE) && !YAML::ENGINE.syck?
163:       to_str.to_yaml(*args)
164:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.