Class: RogueOne::Detector
- Inherits:
-
Object
- Object
- RogueOne::Detector
- Defined in:
- lib/rogue_one/detector.rb
Constant Summary collapse
- GOOGLE_PUBLIC_DNS =
"8.8.8.8"
Instance Attribute Summary collapse
-
#custom_list ⇒ Object
readonly
Returns the value of attribute custom_list.
-
#default_list ⇒ Object
readonly
Returns the value of attribute default_list.
-
#max_concurrency ⇒ Object
readonly
Returns the value of attribute max_concurrency.
-
#record_type ⇒ Object
readonly
Returns the value of attribute record_type.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#verbose ⇒ Object
readonly
Returns the value of attribute verbose.
Instance Method Summary collapse
-
#initialize(target:, custom_list: nil, default_list: "alexa", record_type: "A", threshold: nil, verbose: false) ⇒ Detector
constructor
A new instance of Detector.
- #report ⇒ Object
Constructor Details
#initialize(target:, custom_list: nil, default_list: "alexa", record_type: "A", threshold: nil, verbose: false) ⇒ Detector
Returns a new instance of Detector.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rogue_one/detector.rb', line 18 def initialize( target:, custom_list: nil, default_list: "alexa", record_type: "A", threshold: nil, verbose: false ) @target = target @custom_list = custom_list @default_list = default_list @record_type = record_type.upcase.to_sym @threshold = threshold @verbose = verbose @max_concurrency = Etc.nprocessors * 2 @memo = {} @verbose_memo = nil end |
Instance Attribute Details
#custom_list ⇒ Object (readonly)
Returns the value of attribute custom_list.
14 15 16 |
# File 'lib/rogue_one/detector.rb', line 14 def custom_list @custom_list end |
#default_list ⇒ Object (readonly)
Returns the value of attribute default_list.
14 15 16 |
# File 'lib/rogue_one/detector.rb', line 14 def default_list @default_list end |
#max_concurrency ⇒ Object (readonly)
Returns the value of attribute max_concurrency.
14 15 16 |
# File 'lib/rogue_one/detector.rb', line 14 def max_concurrency @max_concurrency end |
#record_type ⇒ Object (readonly)
Returns the value of attribute record_type.
14 15 16 |
# File 'lib/rogue_one/detector.rb', line 14 def record_type @record_type end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
14 15 16 |
# File 'lib/rogue_one/detector.rb', line 14 def target @target end |
#verbose ⇒ Object (readonly)
Returns the value of attribute verbose.
14 15 16 |
# File 'lib/rogue_one/detector.rb', line 14 def verbose @verbose end |
Instance Method Details
#report ⇒ Object
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/rogue_one/detector.rb', line 39 def report inspect { verdict: verdict, landing_pages: landing_pages, results: results, meta: }.compact end |