class Milestoner::Builders::Syndication::Indexer
Builds syndicated feed output.
Public Class Methods
Source
# File lib/milestoner/builders/syndication/indexer.rb, line 10 def initialize(path_resolver: PathResolver, syndicator: Syndication::Builder.new, **) super(**) @path_resolver = path_resolver @syndicator = syndicator end
Calls superclass method
Public Instance Methods
Source
# File lib/milestoner/builders/syndication/indexer.rb, line 16 def call(tags) = syndicator.call(tags).bind { |body| write body } private attr_reader :path_resolver, :syndicator def write body path = settings.build_output.join(settings.build_basename).sub_ext(".xml") path_resolver.call(path, logger:) { path.write body } end end
Source
# File lib/milestoner/builders/syndication/indexer.rb, line 22 def write body path = settings.build_output.join(settings.build_basename).sub_ext(".xml") path_resolver.call(path, logger:) { path.write body } end