class RedditArchiver::Post
Attributes
created[R]
reddit_id[R]
subreddit[R]
title[R]
Public Class Methods
new(post)
click to toggle source
# File lib/reddit_archiver/post.rb, line 12 def initialize(post) @created = Time.at(post["created"]) @subreddit = post["subreddit"] @reddit_id = post["name"] end
Public Instance Methods
submission_title()
click to toggle source
# File lib/reddit_archiver/post.rb, line 22 def submission_title nil end
title_url()
click to toggle source
# File lib/reddit_archiver/post.rb, line 18 def title_url title.parameterize end
year_month_date()
click to toggle source
# File lib/reddit_archiver/post.rb, line 26 def year_month_date created.strftime('%F_%H-%M-%S') end