Skip to content

Commit 91c41b1

Browse files
committed
utils refactored
1 parent 7a32242 commit 91c41b1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/contentstack/utils.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ module Utils
99
# Simple way to turn a deeply nested hash into an openstruct
1010
# https://coderwall.com/p/74rajw/convert-a-complex-nested-hash-to-an-object
1111
def to_openstruct(hash)
12-
json = hash.to_json
13-
JSON.parse(json, object_class: OpenStruct)
12+
JSON.parse(hash.to_json, object_class: OpenStruct)
1413
end
1514

1615
end

0 commit comments

Comments
 (0)