Sha256: fca1c19f87cc3d9cd294565e067897617714d1e38b9b7c5e3196d5e61b09ebf7

Contents?: true

Size: 704 Bytes

Versions: 9

Compression:

Stored size: 704 Bytes

Contents

module Parade
  module Commands
    
    #
    # Generates a presentation directory and the presentation outline if it
    # does not already exist.
    # 
    class GeneratePresentation
      include RenderFromTemplate

      def description
        "A presentation folder with outline file"
      end

      def generate(options)

        directory = options['dir'] || default_presentation_dirname
        Dir.mkdir(directory) unless File.exists?(directory)

        Dir.chdir(directory) do
          outline_generator = GenerateOutline.new
          outline_generator.generate(options)
        end

      end

      def default_presentation_dirname
        "presentation"
      end

    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
parade-0.10.2 lib/parade/commands/generate_presentation.rb
parade-0.10.1 lib/parade/commands/generate_presentation.rb
parade-0.10.0 lib/parade/commands/generate_presentation.rb
parade-0.9.2 lib/parade/commands/generate_presentation.rb
parade-0.9.1 lib/parade/commands/generate_presentation.rb
parade-0.9.0 lib/parade/commands/generate_presentation.rb
parade-0.8.2 lib/parade/commands/generate_presentation.rb
parade-0.8.1 lib/parade/commands/generate_presentation.rb
parade-0.8.0 lib/parade/commands/generate_presentation.rb