lib/volt/server/rack/component_paths.rb
# returns an array of every folder that is a component
returns an array of every folder that is a component
returns an array of every folder that is a component
def components
    return @components if @components
    @components = {}
    app_folders do |app_folder|
      Dir["#{app_folder}/*"].sort.each do |folder|
        if File.directory?(folder)
          folder_name = folder[/[^\/]+$/]
          @components[folder_name] ||= []
          @components[folder_name] << folder
        end
      end
    end
    return @components
  end
def components return @components if @components @components = { } app_folders do | app_folder | Dir [ "#{app_folder}/*" ] . sort . each do | folder | if File . directory? ( folder ) folder_name = folder [ / [^ \/ ]+$ / ] @components [ folder_name ] ||= [ ] @components [ folder_name ] << folder end end end return @components end
returns an array of every folder that is a component
returns an array of every folder that is a component