Sha256: 874c6117275858b19a62a5f2a7722955bf4a4aabdaff029eb32d604ed53a7b36

Contents?: true

Size: 901 Bytes

Versions: 2

Compression:

Stored size: 901 Bytes

Contents

require 'fileutils'
require 'erb'

module RubySlides
  module Slide
    class Introduction
      include RubySlides::Util

      attr_reader :title, :subtitle

      def initialize(options={})
        require_arguments [:title, :subtitle], 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('introduction_rel.xml.erb', "#{extract_path}/ppt/slides/_rels/slide#{index}.xml.rels", index: 1)
      end
      private :save_rel_xml

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby_slides-1.2.1 lib/ruby_slides/slide/introduction.rb
ruby_slides-1.2.0 lib/ruby_slides/slide/introduction.rb