Sha256: 4fe77da3841d2fba1b518ead4b1c1ace4f6bdca0e749b8c607331d9040fe06fb
Contents?: true
Size: 508 Bytes
Versions: 1
Compression:
Stored size: 508 Bytes
Contents
module OverlayMe mattr_accessor :root_dir, :overlays_directory self.root_dir = '' self.overlays_directory = 'images/overlays' class App def self.call(env) Dir.chdir OverlayMe.root_dir if Dir[OverlayMe.root_dir] images_urls = Dir[ OverlayMe.overlays_directory + '/**/*.*' ].map{|path| '/'+path} [200, {"Content-Type" => "text/html"}, images_urls.to_json] end end module Rails if defined? ::Rails class Engine < ::Rails::Engine end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
overlay_me-0.13.0 | lib/overlay_me.rb |