class SE::API::Comment
Attributes
body[R]
body_markdown[R]
comment_id[R]
created_at[R]
creation_date[R]
edited[R]
id[R]
json[R]
link[R]
owner[R]
post_id[R]
post_type[R]
score[R]
type[R]
user[R]
Public Class Methods
new(item_json)
click to toggle source
# File lib/se/api/types/comment.rb, line 9 def initialize(item_json) @json = Hash(item_json) @body = @json["body"] @body_markdown = @json["body_markdown"] @link = @json["link"] @edited = (@json["edited"] == "true") @post_id = @json["post_id"].to_i @post_type = @json["post_type"] @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