Sha256: 2d72cbb82919aad07a85f89f70be3d9dbab7495caf076ac01144782b8b5dfbd2

Contents?: true

Size: 562 Bytes

Versions: 3

Compression:

Stored size: 562 Bytes

Contents

module Awestruct
  module Extensions
    class Atomizer
      def initialize(entries_name, output_path)
        @entries_name = entries_name
        @output_path = output_path
      end

      def execute(site)
        entries = site.send( @entries_name )
        input_page = File.join( File.dirname(__FILE__), 'template.atom.haml' )
        page = site.engine.load_page( input_page )
        page.output_path = @output_path
        page.entries = entries
        page.title = site.title || site.base_url
        site.pages << page
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
awestruct-0.0.6 lib/awestruct/extensions/atomizer.rb
awestruct-0.0.5 lib/awestruct/extensions/atomizer.rb
awestruct-0.0.4 lib/awestruct/extensions/atomizer.rb