Sha256: 1ea7bb90da091875410a33a1da71c9746ef4452dac00ef85230892f588928cf8
Contents?: true
Size: 349 Bytes
Versions: 1
Compression:
Stored size: 349 Bytes
Contents
module OData class Helpers # Helper to normalize the results of a select result; Ruby 1.9 Hash.select returns a Hash, 1.8 returns an Array # This is for Ruby 1.8 support, but should be removed in the future def self.normalize_to_hash(val) return nil if val.nil? (val.is_a? Hash) ? val : Hash[*val.flatten] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby_odata-0.1.0 | lib/ruby_odata/helpers.rb |