Module: Hpricot::Elem::Trav

Module | Hpricot::Elem::Trav
In: | lib/hpricot/modules.rb lib/hpricot/traverse.rb lib/hpricot/modules.rb lib/hpricot/traverse.rb

### Methods

[] [] []= []= get_attribute get_attribute has_attribute? has_attribute? remove_attribute remove_attribute set_attribute set_attribute

### Included Modules

Container::Trav Container::Trav

### Public Instance methods

[](name)

Alias for get_attribute

[](name)

Alias for get_attribute

[]=(name, val)

Alias for set_attribute

[]=(name, val)

Alias for set_attribute

get_attribute(name)

[Source]

    # File lib/hpricot/traverse.rb, line 800
        def get_attribute(name)
          a = self.raw_attributes && self.raw_attributes[name.to_s]
          a = Hpricot.uxs(a) if a
          a
        end

get_attribute(name)

[Source]

    # File lib/hpricot/traverse.rb, line 800
        def get_attribute(name)
          a = self.raw_attributes && self.raw_attributes[name.to_s]
          a = Hpricot.uxs(a) if a
          a
        end

has_attribute?(name)

[Source]

    # File lib/hpricot/traverse.rb, line 797
        def has_attribute?(name)
          self.raw_attributes && self.raw_attributes.has_key?(name.to_s)
        end

has_attribute?(name)

[Source]

    # File lib/hpricot/traverse.rb, line 797
        def has_attribute?(name)
          self.raw_attributes && self.raw_attributes.has_key?(name.to_s)
        end

remove_attribute(name)

[Source]

    # File lib/hpricot/traverse.rb, line 812
        def remove_attribute(name)
          name = name.to_s
          if has_attribute? name
            altered!
            self.raw_attributes.delete(name)
          end
        end

remove_attribute(name)

[Source]

    # File lib/hpricot/traverse.rb, line 812
        def remove_attribute(name)
          name = name.to_s
          if has_attribute? name
            altered!
            self.raw_attributes.delete(name)
          end
        end

set_attribute(name, val)

[Source]

    # File lib/hpricot/traverse.rb, line 806
        def set_attribute(name, val)
          altered!
          self.raw_attributes ||= {}
          self.raw_attributes[name.to_s] = Hpricot.xs(val)
        end

set_attribute(name, val)

[Source]

    # File lib/hpricot/traverse.rb, line 806
        def set_attribute(name, val)
          altered!
          self.raw_attributes ||= {}
          self.raw_attributes[name.to_s] = Hpricot.xs(val)
        end

[Validate]