class Bridgetown::Publisher
Public Class Methods
new(site)
click to toggle source
@param site [Bridgetown::Site]
# File lib/bridgetown-core/publisher.rb, line 6 def initialize(site) @site = site end
Public Instance Methods
publish?(thing)
click to toggle source
# File lib/bridgetown-core/publisher.rb, line 10 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/bridgetown-core/publisher.rb, line 25 def can_be_published?(thing) thing.data.fetch("published", true) || @site.config.unpublished end