Class: Parade::Parsers::PresentationFilepathParser

Inherits:
Object
  • Object
show all
Defined in:
lib/parade/parsers/presentation_filepath_parser.rb

Class Method Summary collapse

Class Method Details

.parse(filepath, options = {}) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/parade/parsers/presentation_filepath_parser.rb', line 10

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

.presentation_file?(filepath) ⇒ Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/parade/parsers/presentation_filepath_parser.rb', line 28

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