Class: HomographicSpoofing::Detector::Rule::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/homographic_spoofing/detector/rule/base.rb

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Base

Returns a new instance of Base.



4
5
6
# File 'lib/homographic_spoofing/detector/rule/base.rb', line 4

def initialize(context)
  @context = context
end

Instance Method Details

#attack_detected?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


8
9
10
# File 'lib/homographic_spoofing/detector/rule/base.rb', line 8

def attack_detected?
  raise NotImplementedError, "subclasses must override this"
end

#reasonObject



12
13
14
# File 'lib/homographic_spoofing/detector/rule/base.rb', line 12

def reason
  self.class.name.demodulize.underscore
end