Module: AnimalCracker::Server

Defined in:
lib/animalcracker.rb

Instance Method Summary collapse

Instance Method Details

#get_assets(root_path = "") ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/animalcracker.rb', line 7

def get_assets(root_path="")
  get("#{root_path}/*") do
    begin
      "/#{params[:splat].first}".split(",").map { |asset_path| AssetHost[asset_path] || not_found }
    rescue NotFound
      not_found
    end
  end
end