Sha256: a7a73f9e414624eeba61622552a57945abafcb826caf0d47e3d93483ba1ba654
Contents?: true
Size: 638 Bytes
Versions: 2
Compression:
Stored size: 638 Bytes
Contents
require 'shellwords' module Convoy class Utils class << self def symbolize_keys(hash) hash.inject({}) do |result, (key, value)| new_key = (key.kind_of?(String) ? key.to_sym : key) new_value = (value.kind_of?(Hash) ? symbolize_keys(value) : value) result[new_key] = new_value result end end def tokenize_option_string(option_string) option_string ||= '' Shellwords.shellwords(option_string) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
convoy-1.3.2 | lib/convoy/utils.rb |
convoy-1.2.0 | lib/convoy/utils.rb |