module Bookmaker module TOC class Epub attr_accessor :navigation def initialize(navigation) @navigation = navigation end def to_html ERB.new(template).result OpenStruct.new(:navigation => navigation).instance_eval{ binding } end def template <<-HTML.strip_heredoc.force_encoding("utf-8") Table of Contents
HTML end end end end