WhiskeyDisk::Config::StringifyHashKeysFilter

Public Instance Methods

filter(data) click to toggle source
# File lib/whiskey_disk/config/filters/stringify_hash_keys_filter.rb, line 19
def filter(data)
  stringify(data)
end
stringify(structure) click to toggle source
# File lib/whiskey_disk/config/filters/stringify_hash_keys_filter.rb, line 14
def stringify(structure)
  return structure.clone unless structure.respond_to? :keys
  stringify_hash(structure)
end
stringify_hash(data) click to toggle source
# File lib/whiskey_disk/config/filters/stringify_hash_keys_filter.rb, line 6
def stringify_hash(data)
  result = {}
  data.each_pair do |key, value|
    result[key.to_s] = stringify(value)
  end
  result
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.