Class: ActiveSupport::SafeBuffer

Inherits:
String show all
Defined in:
lib/active_support/core_ext/string/output_safety.rb

Instance Method Summary collapse

Methods inherited from String

#as_json, #as_str, #blank?, #to_json, #to_xs

Methods included from CoreExtensions::String::Multibyte

#chars, #is_utf8?, #mb_chars

Methods included from CoreExtensions::String::Behavior

#acts_like_string?

Methods included from CoreExtensions::String::Iterators

append_features, #each_char

Methods included from CoreExtensions::String::StartsEndsWith

append_features, #ends_with?, #starts_with?

Methods included from CoreExtensions::String::Inflections

#camelize, #classify, #constantize, #dasherize, #demodulize, #foreign_key, #humanize, #parameterize, #pluralize, #singularize, #tableize, #titleize, #underscore

Methods included from CoreExtensions::String::Filters

#squish, #squish!

Methods included from CoreExtensions::String::Conversions

#ord, #to_date, #to_datetime, #to_time

Methods included from CoreExtensions::String::Access

#at, #first, #from, #last, #to

Instance Method Details

#+(other) ⇒ Object



65
66
67
# File 'lib/active_support/core_ext/string/output_safety.rb', line 65

def +(other)
  dup.concat(other)
end

#html_safeObject



73
74
75
# File 'lib/active_support/core_ext/string/output_safety.rb', line 73

def html_safe
  self
end

#html_safe?Boolean

Returns:

  • (Boolean)


69
70
71
# File 'lib/active_support/core_ext/string/output_safety.rb', line 69

def html_safe?
  true
end

#to_sObject



77
78
79
# File 'lib/active_support/core_ext/string/output_safety.rb', line 77

def to_s
  self
end

#to_yaml(*args) ⇒ Object



81
82
83
# File 'lib/active_support/core_ext/string/output_safety.rb', line 81

def to_yaml(*args)
  to_str.to_yaml(*args)
end