Object
Monkeypatch to add support for multiple public_roots.
# File lib/thoth/monkeypatch/dispatcher/file.rb, line 34 def in_public?(path) path = expand(path) @expanded ||= { :default => expand(Ramaze::Global.public_root), :custom => expand(Thoth::Config.theme.public) } path.start_with?(@expanded[:default]) || path.start_with?(@expanded[:custom]) end
# File lib/thoth/monkeypatch/dispatcher/file.rb, line 46 def resolve_path(path) joined = ::File.join(Thoth::Config.theme.public, path) unless ::File.exist?(joined) joined = ::File.join(Ramaze::Global.public_root, path) end if ::File.directory?(joined) Dir[joined/"{#{INDICES.join(',')}}"].first || joined else joined end end
Generated with the Darkfish Rdoc Generator 2.