Module: REHTML::TokenInfo

Defined in:
lib/rehtml/tokenizer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#end_posObject (readonly)

Returns the value of attribute end_pos.



8
9
10
# File 'lib/rehtml/tokenizer.rb', line 8

def end_pos
  @end_pos
end

#rawObject (readonly)

Returns the value of attribute raw.



8
9
10
# File 'lib/rehtml/tokenizer.rb', line 8

def raw
  @raw
end

#start_posObject (readonly)

Returns the value of attribute start_pos.



8
9
10
# File 'lib/rehtml/tokenizer.rb', line 8

def start_pos
  @start_pos
end

Instance Method Details

#set_token_info(bpos, scanner) ⇒ Object



9
10
11
12
13
# File 'lib/rehtml/tokenizer.rb', line 9

def set_token_info(bpos,scanner)
  @start_pos=bpos
  @end_pos= scanner.pos
  @raw = scanner.string[@start_pos...(@end_pos)]
end