Module: CMSScanner::ClassMethods

Included in:
CMSScanner
Defined in:
lib/cms_scanner.rb

Overview

Module to be able to use these class methods when the CMSScanner is included in another module

Instance Method Summary collapse

Instance Method Details

#app_name ⇒ String

The lowercase name of the scanner Mainly used in directory paths like the default cookie-jar file and path to load the cli options from files

Returns:

  • (String)


124
125
126
# File 'lib/cms_scanner.rb', line 124

def app_name
  to_s.underscore
end

#cached_requests ⇒ Integer

Returns:

  • (Integer)


70
71
72
# File 'lib/cms_scanner.rb', line 70

def cached_requests
  @@cached_requests ||= 0
end

#cached_requests=(value) ⇒ Object

Parameters:

  • value (Integer)


75
76
77
# File 'lib/cms_scanner.rb', line 75

def cached_requests=(value)
  @@cached_requests = value
end

#start_memory ⇒ Integer

Returns The memory at the start of the scan (when Scan.new), in B.

Returns:

  • (Integer) —

    The memory at the start of the scan (when Scan.new), in B



110
111
112
# File 'lib/cms_scanner.rb', line 110

def start_memory
  @@start_memory ||= 0
end

#start_memory=(value) ⇒ Object

Parameters:

  • value (Integer)


115
116
117
# File 'lib/cms_scanner.rb', line 115

def start_memory=(value)
  @@start_memory = value
end

#total_data_received ⇒ Integer

Returns:

  • (Integer)


100
101
102
# File 'lib/cms_scanner.rb', line 100

def total_data_received
  @@total_data_received ||= 0
end

#total_data_received=(value) ⇒ Object

Parameters:

  • value (Integer)


105
106
107
# File 'lib/cms_scanner.rb', line 105

def total_data_received=(value)
  @@total_data_received = value
end

#total_data_sent ⇒ Integer

Returns:

  • (Integer)


90
91
92
# File 'lib/cms_scanner.rb', line 90

def total_data_sent
  @@total_data_sent ||= 0
end

#total_data_sent=(value) ⇒ Object

Parameters:

  • value (Integer)


95
96
97
# File 'lib/cms_scanner.rb', line 95

def total_data_sent=(value)
  @@total_data_sent = value
end

#total_requests ⇒ Integer

Returns:

  • (Integer)


80
81
82
# File 'lib/cms_scanner.rb', line 80

def total_requests
  @@total_requests ||= 0
end

#total_requests=(value) ⇒ Object

Parameters:

  • value (Integer)


85
86
87
# File 'lib/cms_scanner.rb', line 85

def total_requests=(value)
  @@total_requests = value
end