Sha256: 46e98671613314e442cf62efd2b23ce6d84896463f2b486433dd3618e7822ca4

Contents?: true

Size: 158 Bytes

Versions: 35

Compression:

Stored size: 158 Bytes

Contents

module ButterCMS
  class HashToObject
    def self.convert(hash)
      JSON.parse(hash.to_json, object_class: OpenStruct, quirks_mode: true)
    end
  end
end

Version data entries

35 entries across 35 versions & 3 rubygems

Version Path
buttercms-ruby-zwg-2.5.7 lib/buttercms/hash_to_object.rb
buttercms-ruby-zwg-2.5.2 lib/buttercms/hash_to_object.rb
buttercms-ruby-zwg-2.5.3 lib/buttercms/hash_to_object.rb
buttercms-ruby-zwg-2.4.2 lib/buttercms/hash_to_object.rb
buttercms-ruby-zwg-2.4.1 lib/buttercms/hash_to_object.rb
zuzanky-buttercms-ruby-2.4 lib/buttercms/hash_to_object.rb
buttercms-ruby-2.4 lib/buttercms/hash_to_object.rb
buttercms-ruby-2.3 lib/buttercms/hash_to_object.rb
buttercms-ruby-2.2 lib/buttercms/hash_to_object.rb
buttercms-ruby-2.1 lib/buttercms/hash_to_object.rb
buttercms-ruby-2.0 lib/buttercms/hash_to_object.rb
buttercms-ruby-1.9 lib/buttercms/hash_to_object.rb
buttercms-ruby-1.8 lib/buttercms/hash_to_object.rb
buttercms-ruby-1.7 lib/buttercms/hash_to_object.rb
buttercms-ruby-1.6 lib/buttercms/hash_to_object.rb
buttercms-ruby-1.5 lib/buttercms/hash_to_object.rb
buttercms-ruby-1.4 lib/buttercms/hash_to_object.rb
buttercms-ruby-1.3.2 lib/buttercms/hash_to_object.rb
buttercms-ruby-1.3.1 lib/buttercms/hash_to_object.rb
buttercms-ruby-1.3.0 lib/buttercms/hash_to_object.rb