Class: Megam::FileCache
- Inherits:
-
Object
- Object
- Megam::FileCache
- Defined in:
- lib/megam/core/file_cache.rb
Instance Method Summary collapse
Instance Method Details
#store ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/megam/core/file_cache.rb', line 4 def store file_path_array = File.split(path) file_name = file_path_array.pop cache_path = create_cache_path(File.join(file_path_array)) File.open(File.join(cache_path, file_name), "w", perm) do |io| io.print(contents) end end |