class RedditApi::Comment
Attributes
reddit_id[R]
subreddit_name[R]
Public Class Methods
new(args = {})
click to toggle source
# File lib/reddit_api/comment.rb, line 7 def initialize(args = {}) @reddit_id = args.fetch("id", nil) @author_name = args.fetch("author", nil) @subreddit_name = args.fetch("subreddit", nil) end
Public Instance Methods
to_h()
click to toggle source
# File lib/reddit_api/comment.rb, line 13 def to_h { reddit_id: reddit_id, author_name: author_name, subreddit_name: subreddit_name } end