Class: Miteru::Notifiers::UrlScan

Inherits:
Base
  • Object
show all
Defined in:
lib/miteru/notifiers/urlscan.rb

Instance Method Summary collapse

Instance Method Details

#notifiable?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/miteru/notifiers/urlscan.rb', line 20

def notifiable?
  Miteru.configuration.urlscan_api_key?
end

#notify(website) ⇒ Object

Notifiy to urlscan.io

Parameters:



13
14
15
16
17
18
# File 'lib/miteru/notifiers/urlscan.rb', line 13

def notify(website)
  kits = website.kits.select(&:downloaded?)
  return unless notifiable? && kits.any?

  kits.each { |kit| submit(kit.url) }
end