Sha256: d56baf41b52648337596062c7068c647049e1f65fabbe325070c4ab84c6e14f1

Contents?: true

Size: 845 Bytes

Versions: 1

Compression:

Stored size: 845 Bytes

Contents

require 'fileutils'
require 'erb'

module Powerpoint
  module Slide
    class Textual
      include Powerpoint::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('textual_rel.xml.erb', "#{extract_path}/ppt/slides/_rels/slide#{index}.xml.rels", index: index)
      end
      private :save_rel_xml

      def save_slide_xml(extract_path, index)
        render_view('textual_slide.xml.erb', "#{extract_path}/ppt/slides/slide#{index}.xml")
      end
      private :save_slide_xml
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
powerpoint-pro-2.1.0.1 lib/powerpoint/slide/textual.rb