Sha256: bb623a46498a5524370e420caa98f86f0e7840099135ebc5d28145ab76cb8b70

Contents?: true

Size: 880 Bytes

Versions: 1

Compression:

Stored size: 880 Bytes

Contents

require 'fileutils'
require 'erb'

module Powerpoint
  module Slide
    class Intro
      include Powerpoint::Util
      
      attr_reader :title, :subtitile

      def initialize(options={})
        require_arguments [:title, :subtitile], 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 file_type
        nil
      end

      def save_rel_xml(extract_path, index)
        render_view('textual_rel.xml.erb', "#{extract_path}/ppt/slides/_rels/slide#{index}.xml.rels")
      end
      private :save_rel_xml

      def save_slide_xml(extract_path, index)
        render_view('intro_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-1.8 lib/powerpoint/slide/intro.rb