Renamed xpath_number? to number?
This commit is contained in:
parent
0e9f533358
commit
1f2545c03b
|
@ -194,7 +194,7 @@ module Oga
|
||||||
def on_predicate(ast, input, &block)
|
def on_predicate(ast, input, &block)
|
||||||
test, predicate = *ast
|
test, predicate = *ast
|
||||||
|
|
||||||
if xpath_number?(predicate)
|
if number?(predicate)
|
||||||
index_predicate(test, predicate, input, &block)
|
index_predicate(test, predicate, input, &block)
|
||||||
else
|
else
|
||||||
expression_predicate(test, predicate, input, &block)
|
expression_predicate(test, predicate, input, &block)
|
||||||
|
@ -384,7 +384,7 @@ module Oga
|
||||||
|
|
||||||
# @param [AST::Node] ast
|
# @param [AST::Node] ast
|
||||||
# @return [TrueClass|FalseClass]
|
# @return [TrueClass|FalseClass]
|
||||||
def xpath_number?(ast)
|
def number?(ast)
|
||||||
ast.type == :int || ast.type == :float
|
ast.type == :int || ast.type == :float
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue