class HTML
Attributes
data_location[RW]
object[RW]
Public Class Methods
new(object)
click to toggle source
# File lib/html_compilation/classes/builders/html_builder.rb, line 8 def initialize(object) @object = object end
Public Instance Methods
htmlify(string)
click to toggle source
# File lib/html_compilation/classes/builders/html_builder.rb, line 12 def htmlify(string) subs = {"&" => "&", '<' => "<", '>' => ">"} subs.each do |key, value| if string.to_s.include?(key) begin string.gsub!(key, value) rescue NoMethodError => e print e.message end end end string end