From 7244e28eecfbefadb8f94a1246d444a5f14b619b Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Wed, 4 Jun 2014 19:33:46 +0200 Subject: [PATCH] Corrected docs of the xpath lexer. --- lib/oga/xpath/lexer.rl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/oga/xpath/lexer.rl b/lib/oga/xpath/lexer.rl index 7b5eea5..b8e7f56 100644 --- a/lib/oga/xpath/lexer.rl +++ b/lib/oga/xpath/lexer.rl @@ -59,8 +59,7 @@ module Oga # This method stores the supplied block in `@block` and resets it after # the lexer loop has finished. # - # @param [String] data The String to consume. - # @return [Array] + # @see [#add_token] # def advance(&block) @block = block @@ -103,8 +102,8 @@ module Oga # @param [Fixnum] start # @param [Fixnum] stop # - # @see #text - # @see #add_token + # @see [#text] + # @see [#add_token] # def emit(type, start, stop) value = slice_input(start, stop) @@ -124,11 +123,14 @@ module Oga end ## - # Adds a token with the given type and value to the list. + # Yields a new token to the supplied block. # # @param [Symbol] type The token type. # @param [String] value The token value. # + # @yieldparam [Symbol] type + # @yieldparam [String|NilClass] value + # def add_token(type, value = nil) @block.call(type, value) end