diff options
author | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2016-06-02 03:23:37 +0200 |
---|---|---|
committer | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2017-06-15 19:39:15 +0200 |
commit | 254436df5a2719324196aa787e025fddd585d9c2 (patch) | |
tree | d846f3579831f9a87013636419e74bc3ae4651e2 | |
parent | 428516e88d393145874343af508b831d1aa9c2f2 (diff) | |
download | vipeval-254436df5a2719324196aa787e025fddd585d9c2.tar.gz vipeval-254436df5a2719324196aa787e025fddd585d9c2.zip |
Update score value parsing.
-rw-r--r-- | lib/result_event.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/result_event.rb b/lib/result_event.rb index 478ccd7..31c807d 100644 --- a/lib/result_event.rb +++ b/lib/result_event.rb @@ -20,12 +20,12 @@ class ResultEvent end end - points= -1 + points= "-1" result["Result"]["elements"].each do |e| case e["MIMEtype"] when "text/plain" - if (val=e["value"]).strip.start_with?("*** Score:") - points= val.strip.split(":")[1].to_i + if e["value"] =~ /\*\*\*\s*Score:\s*((\d+)\.?(\d*))/ + points= $~[1] break end end |