class Msgtrail::Article
Constants
- TYPE_FILE
- TYPE_GIST
- TYPE_TWEET
Public Class Methods
fetch_file_based_article(working_directory, article)
click to toggle source
Using :bodies array for file, gists, and tweets even though for file-based articles only a single file is supported at the moment.
For the sake of symmetry and future expansion :bodies is used for all three article types.
# File lib/msgtrail/article.rb, line 17 def self.fetch_file_based_article(working_directory, article) article[:bodies] = MarkdownFile.file_bodies(working_directory, article) end
fetch_gist_based_article(article)
click to toggle source
# File lib/msgtrail/article.rb, line 21 def self.fetch_gist_based_article(article) article[:bodies] = GitHub.gist_bodies(article[:gist_id]) end
fetch_tweet_based_article(article)
click to toggle source
# File lib/msgtrail/article.rb, line 25 def self.fetch_tweet_based_article(article) article[:bodies] = Twitter.tweet_bodies(article[:tweet_ids]) end