class AlchemyLanguage::UrlService

Attributes

path[RW]
type[RW]

Public Class Methods

new(path) click to toggle source
# File lib/alchemy_language/url_service.rb, line 27
def initialize(path)
  is_url?
  @path = path
  @type = "url"
end

Public Instance Methods

check_url() click to toggle source
# File lib/alchemy_language/url_service.rb, line 37
def check_url
  @path =~ URI::regexp(["ftp", "http", "https"])
end
is_url?() click to toggle source
# File lib/alchemy_language/url_service.rb, line 33
def is_url?
  "params is not url" if check_url.nil?
end