class Hpricot::Attributes

def [] k

def [] k 
  Hpricot.uxs((@element.raw_attributes || {})[k])
end

def []= k, v

def []= k, v
  (@element.raw_attributes ||= {})[k] = v.fast_xs
end

def initialize e

def initialize e
  @element = e
end

def inspect

def inspect
  to_hash.inspect
end

def to_hash

def to_hash
  if @element.raw_attributes
    @element.raw_attributes.inject({}) do |hsh, (k, v)|
      hsh[k] = Hpricot.uxs(v)
      hsh
    end
  else
    {}
  end
end

def to_s

def to_s
  to_hash.to_s
end