class Ruqqus::Comment

Describes a comment in a post.

Public Instance Methods

level() click to toggle source
# File lib/ruqqus/types/comment.rb, line 32
def level
  @data[:level]
end
parent_comment?() click to toggle source

@return [Boolean] `true` if the comment's parent is comment, otherwise `false` if it is a post.

# File lib/ruqqus/types/comment.rb, line 22
def parent_comment?
  level > 1
end
parent_id() click to toggle source
# File lib/ruqqus/types/comment.rb, line 36
def parent_id
  @data[:parent]
end
parent_post?() click to toggle source

@return [Boolean] `true` if the comment's parent is post, otherwise `false` if it is a comment.

# File lib/ruqqus/types/comment.rb, line 28
def parent_post?
  level == 1
end
post_id() click to toggle source
# File lib/ruqqus/types/comment.rb, line 40
def post_id
  @data[:post]
end