Class: HomographicSpoofing::Detector::Rule::Base
- Inherits:
-
Object
- Object
- HomographicSpoofing::Detector::Rule::Base
- Defined in:
- lib/homographic_spoofing/detector/rule/base.rb
Direct Known Subclasses
DisallowedCharacters, Idn::Base, Local::DotAtomText, Local::Nfkc, MixedDigits, MixedScripts, QuotedString::BidiControl, QuotedString::Nfc, QuotedString::NonspacingMarks
Instance Method Summary collapse
- #attack_detected? ⇒ Boolean
-
#initialize(context) ⇒ Base
constructor
A new instance of Base.
- #reason ⇒ Object
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
8 9 10 |
# File 'lib/homographic_spoofing/detector/rule/base.rb', line 8 def attack_detected? raise NotImplementedError, "subclasses must override this" end |
#reason ⇒ Object
12 13 14 |
# File 'lib/homographic_spoofing/detector/rule/base.rb', line 12 def reason self.class.name.demodulize.underscore end |