lib/sinatra/assetpack/options.rb
def dyn_local_file_for(requested_file, from)
        # Remove extension
        file = requested_file
        extension = ''

        file.sub(/^(.*)(\.[^\.]+)$/) { file, extension = $1, $2 }

        # Remove cache-buster (/js/app.28389.js => /js/app)
        file = $1  if file =~ /^(.*)\.[0-9]+$/

        Dir[File.join(app.root, from, "#{file}#{extension}")].first
      end
# Returns the local file for a given URI path. (for dynamic files)
# Returns nil if a file is not found.
# TODO: consolidate with local_file_for
Returns the local file for a given URI path. (for dynamic files)
Returns nil if a file is not found.
TODO: consolidate with local_file_for
Returns the local file for a given URI path . ( for dynamic files ) Returns nil if a file is not found . TODO : consolidate with local_file_for
def dyn_local_file_for(requested_file, from)
        file = requested_file
        extension = ''
        file.sub(/^(.*)(\.[^\.]+)$/) { file, extension = $1, $2 }
        file = $1  if file =~ /^(.*)\.[0-9]+$/
        Dir[File.join(app.root, from, "#{file}#{extension}")].first
      end
def dyn_local_file_for ( requested_file , from ) file = requested_file extension = '' file . sub ( / ^(.*)( \. [^ \. ]+)$ / ) { file , extension = $1 , $2 } file = $1 if file =~ / ^(.*) \. [0-9]+$ / Dir [ File . join ( app . root , from , "#{file}#{extension}" ) ] . first end
Returns the local file for a given URI path.
Returns the local file for a given URI path .
# Remove extension # Remove cache-buster (/js/app.28389.js => /js/app)
requested_file
from