Sha256: 93f93c54543af517e760f09c916d6c15d06ec9fbd7ba1bcb969d4d47692a533e
Contents?: true
Size: 391 Bytes
Versions: 6
Compression:
Stored size: 391 Bytes
Contents
module Aitch module Utils extend self def underscore(string) string = string.gsub(/(?<=.)(URI|[A-Z])/) do |char| "_#{char}" end string.downcase end def symbolize_keys(hash) hash.each_with_object({}) do |(key, value), buffer| buffer[key.to_sym] = value end end def build_query(data) data.to_query end end end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
aitch-0.5.0 | lib/aitch/utils.rb |
aitch-0.4.1 | lib/aitch/utils.rb |
aitch-0.4.0 | lib/aitch/utils.rb |
aitch-0.3.0 | lib/aitch/utils.rb |
aitch-0.2.1 | lib/aitch/utils.rb |
aitch-0.2.0 | lib/aitch/utils.rb |