class Waistband::StringifiedHash

Public Class Methods

new_from(original) click to toggle source
# File lib/waistband/stringified_hash.rb, line 6
def new_from(original)
  copy = new
  original.each do |k, v|
    copy[k] = v
  end
  copy
end

Public Instance Methods

stringify_all() click to toggle source
# File lib/waistband/stringified_hash.rb, line 16
def stringify_all
  stringified = {}

  each do |key, val|
    if val.respond_to?(:to_s)
      stringified[key] = val.to_s
    else
      stringified[key] = val
    end
  end

  stringified
end