Class: Hpricot::Token

Inherits:
Struct
  • Object
show all
Defined in:
lib/hpricot/scanner.rb

Overview

Token carrying its exact source bytes.

raw is the fidelity mechanism: it is the verbatim slice of the input this token came from, and the tree builder stores it so serialization can emit the original bytes rather than re-encoding. Never decode into raw.

Instance Attribute Summary collapse

Instance Attribute Details

#attrs ⇒ Object

Returns the value of attribute attrs

Returns:

  • (Object) —

    the current value of attrs



11
12
13
# File 'lib/hpricot/scanner.rb', line 11

def attrs
  @attrs
end

#closed ⇒ Object

Returns the value of attribute closed

Returns:

  • (Object) —

    the current value of closed



11
12
13
# File 'lib/hpricot/scanner.rb', line 11

def closed
  @closed
end

#content ⇒ Object

Returns the value of attribute content

Returns:

  • (Object) —

    the current value of content



11
12
13
# File 'lib/hpricot/scanner.rb', line 11

def content
  @content
end

#kind ⇒ Object

Returns the value of attribute kind

Returns:

  • (Object) —

    the current value of kind



11
12
13
# File 'lib/hpricot/scanner.rb', line 11

def kind
  @kind
end

#name ⇒ Object

Returns the value of attribute name

Returns:

  • (Object) —

    the current value of name



11
12
13
# File 'lib/hpricot/scanner.rb', line 11

def name
  @name
end

#raw ⇒ Object

Returns the value of attribute raw

Returns:

  • (Object) —

    the current value of raw



11
12
13
# File 'lib/hpricot/scanner.rb', line 11

def raw
  @raw
end