Module: Skyscraper::Path
- Extended by:
- ActiveSupport::Autoload
- Defined in:
- lib/skyscraper/path.rb,
lib/skyscraper/path/base.rb,
lib/skyscraper/path/local.rb,
lib/skyscraper/path/remote.rb
Defined Under Namespace
Classes: Base, Local, Remote
Class Method Summary
collapse
Class Method Details
.absolute?(path) ⇒ Boolean
24
25
26
|
# File 'lib/skyscraper/path.rb', line 24
def absolute? path
path.starts_with? "/"
end
|
.remote?(path) ⇒ Boolean
18
19
20
21
22
|
# File 'lib/skyscraper/path.rb', line 18
def remote? path
path = "http://"+path unless path.match /^(http|https):\/\//
uri = URI.parse(path)
uri.host ? true : false
end
|