Sha256: 4f2a8e222ad599be0ad6ef3b65964d0a9842120b8acce374646f48c16778014e

Contents?: true

Size: 812 Bytes

Versions: 3

Compression:

Stored size: 812 Bytes

Contents

module LatoCore
  # This module contains functions for cache information.
  module Interface::Cache

    # This function return a string with the path of cache directory on
    # main project.
    def core_getCacheDirectory
      # directories for assets
      dirname = "#{Rails.root}/app/assets/images/lato"
      FileUtils.mkdir_p(dirname) unless File.exist?(dirname)
      dirname = "#{Rails.root}/app/assets/stylesheets/lato"
      FileUtils.mkdir_p(dirname) unless File.exist?(dirname)
      dirname = "#{Rails.root}/app/assets/javascripts/lato"
      FileUtils.mkdir_p(dirname) unless File.exist?(dirname)
      # main cache directory
      dirname = "#{Rails.root}/config/lato"
      FileUtils.mkdir_p(dirname) unless File.exist?(dirname)
      # return directory
      return dirname
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lato_core-1.1.5 lib/lato_core/interface/cache.rb
lato_core-1.1.4 lib/lato_core/interface/cache.rb
lato_core-1.1.3 lib/lato_core/interface/cache.rb