Sha256: 159e64c372259d91de3173edbfd1550539599a4e1a9bec51a7c90c5bd9861b44

Contents?: true

Size: 650 Bytes

Versions: 5

Compression:

Stored size: 650 Bytes

Contents

# coding: utf-8
require 'hubdown/style_generator'
require 'erb'

module Hubdown
  class PageBuilder
    
    def initialize args
      @body = args.fetch("body"){ '' }
      @uri = args.fetch("uri"){ 'https://github.com/knomedia/hubdown' }
      @filename = args.fetch("filename"){ '' }
      @style_gen = StyleGenerator.new( @uri )
    end

    def get_page
      links = @style_gen.get_css_links
      body = @body
      filename = @filename
      template_path = File.dirname(__FILE__) + "/template.html.erb"
      template = ERB.new( File.read( template_path ), nil, "-" )
      page = template.result(binding)
      page      
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hubdown-0.0.15 lib/hubdown/page_builder.rb
hubdown-0.0.14 lib/hubdown/page_builder.rb
hubdown-0.0.13 lib/hubdown/page_builder.rb
hubdown-0.0.12 lib/hubdown/page_builder.rb
hubdown-0.0.11 lib/hubdown/page_builder.rb