Class: String

Inherits:
Object show all
Defined in:
lib/file_scheduler/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#to_urlObject



3
4
5
6
7
# File 'lib/file_scheduler/core_ext.rb', line 3

def to_url
  URI::parse self
rescue URI::InvalidURIError
  nil
end

#url?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/file_scheduler/core_ext.rb', line 9

def url?
  start_with? "http://"
end