Module: Flott::FilenameMixin

Included in:
EnvironmentMixin, Parser
Defined in:
lib/flott.rb

Overview

This module contains methods to interpret filenames of the templates.

Instance Method Summary collapse

Instance Method Details

#interpret_filename_as_page(filename) ⇒ Object



162
163
164
165
166
167
168
169
170
171
# File 'lib/flott.rb', line 162

def interpret_filename_as_page(filename)
  filename.untaint
  if filename[0] == ?/
    filename = filename[1..-1]
  elsif workdir
    filename = File.expand_path(File.join(workdir, filename))
    filename[rootdir] = ''
  end
  filename
end