Sha256: 126aa90adcdbb23b63e1fb8e63833c0fb8283da16d294c27c0034956f1593f7a

Contents?: true

Size: 325 Bytes

Versions: 12

Compression:

Stored size: 325 Bytes

Contents

module Dap
module Utils
module Misc

  def self.flatten_hash(h)
    ret = {}
    h.each_pair do |k,v|
      next unless k
      if v.is_a?(Hash)
        flatten_hash(v).each_pair do |fk,fv|
          ret["#{k}.#{fk}"] = fv.to_s
        end
      else
        ret[k.to_s] = v.to_s
      end
    end
    ret
  end

end
end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
dap-1.3.1 lib/dap/utils/misc.rb
dap-1.3.0 lib/dap/utils/misc.rb
dap-1.2.9 lib/dap/utils/misc.rb
dap-1.2.8 lib/dap/utils/misc.rb
dap-1.2.7 lib/dap/utils/misc.rb
dap-1.2.6 lib/dap/utils/misc.rb
dap-1.2.5 lib/dap/utils/misc.rb
dap-1.2.4 lib/dap/utils/misc.rb
dap-1.2.3 lib/dap/utils/misc.rb
dap-1.2.2 lib/dap/utils/misc.rb
dap-1.2.1 lib/dap/utils/misc.rb
dap-1.2.0 lib/dap/utils/misc.rb