lib/pdd/rule/estimates.rb in pdd-0.10 vs lib/pdd/rule/estimates.rb in pdd-0.11
- old
+ new
@@ -28,11 +28,11 @@
class Min
# Ctor.
# +xml+:: XML with puzzles
def initialize(xml, min)
@xml = xml
- @min = min
+ @min = min.to_i
end
def errors
@xml.xpath("//puzzle[number(estimate) < #{@min}]").map do |p|
"puzzle #{p.xpath('file/text()')}:#{p.xpath('lines/text()')}"\
@@ -46,10 +46,10 @@
class Max
# Ctor.
# +xml+:: XML with puzzles
def initialize(xml, min)
@xml = xml
- @min = min
+ @min = min.to_i
end
def errors
@xml.xpath("//puzzle[number(estimate) > #{@min}]").map do |p|
"puzzle #{p.xpath('file/text()')}:#{p.xpath('lines/text()')}"\