class Jekyll::Publisher

Public Class Methods

new(site) click to toggle source
# File lib/jekyll/publisher.rb, line 5
def initialize(site)
  @site = site
end

Public Instance Methods

hidden_in_the_future?(thing) click to toggle source
# File lib/jekyll/publisher.rb, line 13
def hidden_in_the_future?(thing)
  thing.respond_to?(:date) && !@site.future && thing.date.to_i > @site.time.to_i
end
publish?(thing) click to toggle source
# File lib/jekyll/publisher.rb, line 9
def publish?(thing)
  can_be_published?(thing) && !hidden_in_the_future?(thing)
end

Private Instance Methods

can_be_published?(thing) click to toggle source
# File lib/jekyll/publisher.rb, line 19
def can_be_published?(thing)
  thing.data.fetch("published", true) || @site.unpublished
end