Method: MemoRack::Builder#copy_public
- Defined in:
- lib/memorack/builder.rb
#copy_public(views, output, &callback) ⇒ Object
テーマの公開ファイルをコピーする
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/memorack/builder.rb', line 162 def copy_public(views, output, &callback) public_files.each { |path_info| callback.call(path_info) if callback ext = split_extname(path_info)[1] if css_exts.include?(ext) content_write(path_info, '.css', output) { |template| content = render_css(template) } else fullpath = file_search(path_info, {views: views}, nil) copy_file(fullpath, [output, path_info]) if fullpath end } end |