Included Modules

Hpricot::Elem::Trav

Public Instance Methods

[](name) click to toggle source
Alias for: get_attribute
[]=(name, val) click to toggle source
Alias for: set_attribute
get_attribute(name) click to toggle source
     # File lib/hpricot/traverse.rb, line 818
818:     def get_attribute(name)
819:       a = self.raw_attributes && self.raw_attributes[name.to_s]
820:       a = Hpricot.uxs(a) if a
821:       a
822:     end
Also aliased as: []
has_attribute?(name) click to toggle source
     # File lib/hpricot/traverse.rb, line 815
815:     def has_attribute?(name)
816:       self.raw_attributes && self.raw_attributes.has_key?(name.to_s)
817:     end
remove_attribute(name) click to toggle source
     # File lib/hpricot/traverse.rb, line 830
830:     def remove_attribute(name)
831:       name = name.to_s
832:       if has_attribute? name
833:         altered!
834:         self.raw_attributes.delete(name)
835:       end
836:     end
set_attribute(name, val) click to toggle source
     # File lib/hpricot/traverse.rb, line 824
824:     def set_attribute(name, val)
825:       altered!
826:       self.raw_attributes ||= {}
827:       self.raw_attributes[name.to_s] = val.fast_xs
828:     end
Also aliased as: []=

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.