Class: DomainsScanner::ResultItem

Inherits:
Object
  • Object
show all
Defined in:
lib/domains_scanner/result_item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title:, url:) ⇒ ResultItem



5
6
7
8
9
10
11
12
# File 'lib/domains_scanner/result_item.rb', line 5

def initialize(title:, url:)
  @title = title
  @url = url

  if url
    @uri = URI(@url)
  end
end

Instance Attribute Details

#titleObject (readonly)

Returns the value of attribute title.



3
4
5
# File 'lib/domains_scanner/result_item.rb', line 3

def title
  @title
end

#uriObject (readonly)

Returns the value of attribute uri.



3
4
5
# File 'lib/domains_scanner/result_item.rb', line 3

def uri
  @uri
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/domains_scanner/result_item.rb', line 3

def url
  @url
end

Instance Method Details

#hostObject



14
15
16
# File 'lib/domains_scanner/result_item.rb', line 14

def host
  @uri && @uri.host
end