lib/pdd/rule/estimates.rb in pdd-0.17.9 vs lib/pdd/rule/estimates.rb in pdd-0.18

- old
+ new

@@ -1,7 +1,5 @@ -# encoding: utf-8 -# # Copyright (c) 2014-2017 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights @@ -32,11 +30,11 @@ @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()')}"\ + "Puzzle #{p.xpath('file/text()')}:#{p.xpath('lines/text()')}"\ " has an estimate of #{p.xpath('estimate/text()')} minutes,"\ " which is lower than #{@min} minutes" end end end @@ -50,10 +48,10 @@ @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()')}"\ + "Puzzle #{p.xpath('file/text()')}:#{p.xpath('lines/text()')}"\ " has an estimate of #{p.xpath('estimate/text()')} minutes,"\ " which is bigger than #{@min} minutes" end end end