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_nameString

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)


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

def app_name
  to_s.underscore
end

#cached_requestsInteger

Returns:

  • (Integer)


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

def cached_requests
  @@cached_requests ||= 0
end

#cached_requests=(value) ⇒ Object

Parameters:

  • value (Integer)


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

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

#start_memoryInteger

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



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

def start_memory
  @@start_memory ||= 0
end

#start_memory=(value) ⇒ Object

Parameters:

  • value (Integer)


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

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

#total_data_receivedInteger

Returns:

  • (Integer)


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

def total_data_received
  @@total_data_received ||= 0
end

#total_data_received=(value) ⇒ Object

Parameters:

  • value (Integer)


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

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

#total_data_sentInteger

Returns:

  • (Integer)


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

def total_data_sent
  @@total_data_sent ||= 0
end

#total_data_sent=(value) ⇒ Object

Parameters:

  • value (Integer)


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

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

#total_requestsInteger

Returns:

  • (Integer)


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

def total_requests
  @@total_requests ||= 0
end

#total_requests=(value) ⇒ Object

Parameters:

  • value (Integer)


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

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