lib/redpen/result.rb in redpen-0.1.0 vs lib/redpen/result.rb in redpen-0.2.0
- old
+ new
@@ -1,16 +1,16 @@
module Redpen
class Result
- ERROR_REGEXP = /ValidationError/
- MESSAGE_REDEXP = /\A\[[0-9]+-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+\.[0-9]+\].*\Z/
-
attr_reader :messages
- def initialize(raw_message)
- @messages = raw_message.split("\n").reject { |msg| msg.match(MESSAGE_REDEXP) }
+ # @param out [String] stdout
+ # @param _err [String] stderr
+ # @param _status [Process::Status]
+ def initialize(out, _err, _status)
+ @messages = out.split("\n")
end
def valid?
- messages.all? { |msg| msg !~ ERROR_REGEXP }
+ messages.empty?
end
end
end