Sha256: 3a91f95ceada1e8c564d383dba38cf3d966d47aa56f2c94c885a96cc2acdf72a

Contents?: true

Size: 748 Bytes

Versions: 9

Compression:

Stored size: 748 Bytes

Contents

require_relative 'presentation_directory_parser'
require_relative 'presentation_file_parser'
require_relative 'slides_file_content_parser'

module Parade
  module Parsers

    class PresentationFilepathParser

      def self.parse(filepath,options = {})
        return nil unless File.exists? filepath

        if File.directory? filepath
          PresentationDirectoryParser.parse filepath, options
        else

          if presentation_file?(filepath)
            PresentationFileParser.parse filepath, options
          else
            SlidesFileContentParser.parse filepath, options
          end

        end

      end


      def self.presentation_file?(filepath)
        File.basename(filepath) == "parade"
      end

    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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