require 'fileutils' require 'erb' module RubySlides module Slide class Table include RubySlides::Util attr_reader :title, :content def initialize(options={}) require_arguments [:title, :content], options options.each {|k, v| instance_variable_set("@#{k}", v)} end def save(extract_path, index) save_rel_xml(extract_path, index) save_slide_xml(extract_path, index) end def save_rel_xml(extract_path, index) render_view('table_rel.xml.erb', "#{extract_path}/ppt/slides/_rels/slide#{index}.xml.rels", index: 2) end private :save_rel_xml def save_slide_xml(extract_path, index) render_view('table_slide.xml.erb', "#{extract_path}/ppt/slides/slide#{index}.xml") end private :save_slide_xml end end end