Class: Builder::XmlBase

Inherits:
Object
  • Object
show all
Defined in:
lib/acts_as_isdoc.rb

Instance Method Summary collapse

Instance Method Details

#encoded_tag!(sym, *args, &block) ⇒ Object



32
33
34
35
36
37
38
39
40
41
# File 'lib/acts_as_isdoc.rb', line 32

def encoded_tag!(sym, *args, &block)
  args = args.map do |a|
    if a.kind_of? ::Hash
      a.each_pair {|key, value| a[key] = ::HTMLEntities.new.encode(value)}
    else
      ::HTMLEntities.new.encode(a)
    end
  end
  tag!(sym, *args, &block)
end