module Blogpostify
Constants
- VERSION
Attributes
configuration[RW]
Public Class Methods
blogs()
click to toggle source
# File lib/blogpostify.rb, line 46 def blogs configuration.blogs end
configure() { |configuration| ... }
click to toggle source
# File lib/blogpostify.rb, line 27 def configure self.configuration ||= Configuration.new yield configuration end
find_blog!(blog_short_name)
click to toggle source
# File lib/blogpostify.rb, line 32 def find_blog!(blog_short_name) blog_short_name = blog_short_name.to_s found_blog = blogs.find do |blog| blog.short_name == blog_short_name end if found_blog.nil? raise BlogNotFoundError, "Blog #{blog_short_name} is not configured. Check Blogpostify#blogs." else found_blog end end
update_blog(blog_name)
click to toggle source
# File lib/blogpostify.rb, line 56 def update_blog(blog_name) find_blog!(blog_name).update_posts end
update_blogs()
click to toggle source
# File lib/blogpostify.rb, line 50 def update_blogs blogs.flat_map do |blog| blog.update_posts end end