From c89b0e7dd2052c4f63c4f520a8c0961d8042ea96 Mon Sep 17 00:00:00 2001 From: izwick-schachter Date: Sat, 20 Jan 2018 12:35:05 -0500 Subject: [PATCH] Code cleanup --- lib/se/api/types/comment.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/se/api/types/comment.rb b/lib/se/api/types/comment.rb index dec5871..e342df6 100644 --- a/lib/se/api/types/comment.rb +++ b/lib/se/api/types/comment.rb @@ -8,15 +8,15 @@ class Comment def initialize(item_json) @json = item_json - @body = item_json["body"] - @body_markdown = item_json["body_markdown"] - @link = item_json["link"] - @post_id = item_json["post_id"].to_i - @score = item_json["score"].to_i - @type = item_json["post_type"] - @id = item_json["comment_id"].to_i - @created_at = item_json["creation_date"] - @author = User.new(item_json["owner"]) + @body = @json["body"] + @body_markdown = @json["body_markdown"] + @link = @json["link"] + @post_id = @json["post_id"].to_i + @score = @json["score"].to_i + @type = @json["post_type"] + @id = @json["comment_id"].to_i + @created_at = @json["creation_date"] + @author = User.new(@json["owner"]) end alias_method :user, :author