Class: Object

Inherits:
BasicObject
Defined in:
lib/erector/extensions/object.rb

Instance Method Summary collapse

Instance Method Details

#escape_single_quotesObject



14
15
16
# File 'lib/erector/extensions/object.rb', line 14

def escape_single_quotes
  self.gsub(/[']/, '\\\\\'')
end

#html_escapeObject



6
7
8
# File 'lib/erector/extensions/object.rb', line 6

def html_escape
  return CGI.escapeHTML(to_s)
end

#html_unescapeObject



10
11
12
# File 'lib/erector/extensions/object.rb', line 10

def html_unescape
  CGI.unescapeHTML(to_s)
end

#metaclassObject



2
3
4
# File 'lib/erector/extensions/object.rb', line 2

def metaclass
  class << self; self; end
end