Top Level Namespace

Defined Under Namespace

Modules: Juici

Instance Method Summary collapse

Instance Method Details

#build_url_for(entity) ⇒ Object



1
2
3
4
5
6
7
8
9
10
# File 'lib/juici/helpers/url_helpers.rb', line 1

def build_url_for(entity)
  URI.escape case entity
  when String
    "/builds/#{entity}/list"
  when ::Juici::Project
    "/builds/#{entity.name}/list"
  when ::Juici::Build
    "/builds/#{entity[:parent]}/show/#{entity[:_id]}"
  end
end