class Array
SPB runs on CentOS 7, which uses ruby 2.0.0-p598. On that version the Array
class does not have the to_h
method. The code below is a fix for that and should be removed when CentOS updates its ruby version. Version 2.1.0 already has Array#to_h
built-in.
Public Instance Methods
to_h()
click to toggle source
# File lib/kolekti/runner.rb, line 7 def to_h result_hash = {} self.each do |code, metric_configuration| result_hash[code] = metric_configuration end return result_hash end