Sha256: e1f27b1dc176f9d8dad22d4eb9ae951e34cd818b71f827e641dfb9e3d0ea9a66
Contents?: true
Size: 409 Bytes
Versions: 3
Compression:
Stored size: 409 Bytes
Contents
module SimpleHubspot class Utils class << self def properties_to_hash(props) newprops = HashWithIndifferentAccess.new props.each { |k, v| newprops[k] = v["value"] } newprops end def hash_to_properties(hash, opts = {}) key_name = opts[:key_name] || "property" hash.map { |k, v| { key_name => k.to_s, "value" => v } } end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
simple_hubspot-0.1.5 | lib/simple_hubspot/utils.rb |
simple_hubspot-0.1.3 | lib/simple_hubspot/utils.rb |
simple_hubspot-0.1.1 | lib/simple_hubspot/utils.rb |