module JsImagePaths::Generator
Public Class Methods
generate()
click to toggle source
# File lib/js_image_paths/generator.rb, line 5 def self.generate image_hash.to_json end
image_hash()
click to toggle source
# File lib/js_image_paths/generator.rb, line 9 def self.image_hash images = context.environment.each_logical_path(->(_, path) { path.include? "images" }) images.each_with_object({}) do |path, images| images[path] = context.asset_path(path) end end