Method: Assette::Config#compiled_path

Defined in:
lib/assette/config.rb

#compiled_path(str) ⇒ Object



138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/assette/config.rb', line 138

def compiled_path str
  str = str.dup
  if sha
    case cache_method.to_s
    when 'path'
      str = File.join(sha,str)
    when 'param'
      str << (str.include?('?') ? '&' : '?')
      
      str << 'v=' << sha
    else
      warn('No cache compile method set (param or path)')
    end
  end
  
  str
end