Class: Twingly::URL::UrlObject

Inherits:
Struct
  • Object
show all
Defined in:
lib/twingly/url.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#domainObject

Returns the value of attribute domain

Returns:

  • (Object)

    the current value of domain



12
13
14
# File 'lib/twingly/url.rb', line 12

def domain
  @domain
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



12
13
14
# File 'lib/twingly/url.rb', line 12

def url
  @url
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/twingly/url.rb', line 13

def valid?
  url && domain && SCHEMES.include?(url.normalized_scheme)
end