Class: Miteru::Feeds::UrlScan
Instance Attribute Summary collapse
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Instance Method Summary collapse
- #api ⇒ Object
-
#initialize(size = 100) ⇒ UrlScan
constructor
A new instance of UrlScan.
- #urls ⇒ Object
Constructor Details
#initialize(size = 100) ⇒ UrlScan
Returns a new instance of UrlScan.
10 11 12 13 |
# File 'lib/miteru/feeds/urlscan.rb', line 10 def initialize(size = 100) @size = size raise ArgumentError, "size must be less than 10,000" if size > 10_000 end |
Instance Attribute Details
#size ⇒ Object (readonly)
Returns the value of attribute size.
8 9 10 |
# File 'lib/miteru/feeds/urlscan.rb', line 8 def size @size end |
Instance Method Details
#api ⇒ Object
15 16 17 |
# File 'lib/miteru/feeds/urlscan.rb', line 15 def api @api ||= ::UrlScan::API.new end |
#urls ⇒ Object
19 20 21 22 23 24 |
# File 'lib/miteru/feeds/urlscan.rb', line 19 def urls urls_from_community_feed rescue ::UrlScan::ResponseError => e puts "Failed to load urlscan.io feed (#{e})" [] end |