Sha256: 5970a42cbfadf8b41074bb7c490e8fdcea2f8d94e979b03dcde0a9ccde2a7ea3
Contents?: true
Size: 503 Bytes
Versions: 71
Compression:
Stored size: 503 Bytes
Contents
module SparkApi # Used for API client options that accept string keys instead of symbols -- # turns all symbol keys into a string for consistancy, allowing applications # using the client to pass in parameters as symbols or strings. class OptionsHash < Hash def initialize(from_hash={}) from_hash.keys.each do |k| if k.is_a?(Symbol) self[k.to_s] = from_hash[k] else self[k] = from_hash[k] end end self end end end
Version data entries
71 entries across 71 versions & 1 rubygems