lib/pdd/rule/roles.rb in pdd-0.15.4 vs lib/pdd/rule/roles.rb in pdd-0.16

- old
+ new

@@ -36,16 +36,16 @@ def errors @xml.xpath('//puzzle').map do |p| role = p.xpath('role/text()').to_s next nil if @roles.include?(role) "puzzle #{p.xpath('file/text()')}:#{p.xpath('lines/text()')}" + - if role.empty? - " doesn't define any role"\ - ", while one of these roles is required: #{@roles}" - else - " defines role #{role}"\ - ", while only these roles are allowed: #{@roles}" - end + if role.empty? + " doesn't define any role"\ + ", while one of these roles is required: #{@roles}" + else + " defines role #{role}"\ + ", while only these roles are allowed: #{@roles}" + end end.compact end end end end