Module: PeekAView::Tools

Defined in:
lib/peek_a_view/tools.rb,
lib/peek_a_view/tools/yslow.rb,
lib/peek_a_view/tools/checker.rb,
lib/peek_a_view/tools/html_validator.rb

Defined Under Namespace

Classes: Checker, HtmlValidator, YSlow

Class Method Summary collapse

Class Method Details

.view_from_uri(uri, options = { }) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/peek_a_view/tools.rb', line 5

def self.view_from_uri(uri, options = { })
  if (prefix = options[:prefix])
    uri.sub(%r|^#{prefix}/?|, '')
  else
    URI.parse(uri).path
  end
end