Class: DomainsScanner::ResultItem
- Inherits:
-
Object
- Object
- DomainsScanner::ResultItem
- Defined in:
- lib/domains_scanner/result_item.rb
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #host ⇒ Object
-
#initialize(title:, url:) ⇒ ResultItem
constructor
A new instance of ResultItem.
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
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/domains_scanner/result_item.rb', line 3 def title @title end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
3 4 5 |
# File 'lib/domains_scanner/result_item.rb', line 3 def uri @uri end |
#url ⇒ Object (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
#host ⇒ Object
14 15 16 |
# File 'lib/domains_scanner/result_item.rb', line 14 def host @uri && @uri.host end |