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)


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

def app_name
  to_s.underscore
end

#cached_requestsInteger

Returns:

  • (Integer)


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

def cached_requests
  @@cached_requests ||= 0
end

#cached_requests=(value) ⇒ Object

Parameters:

  • value (Integer)


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

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



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

def start_memory
  @@start_memory ||= 0
end

#start_memory=(value) ⇒ Object

Parameters:

  • value (Integer)


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

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

#total_data_receivedInteger

Returns:

  • (Integer)


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

def total_data_received
  @@total_data_received ||= 0
end

#total_data_received=(value) ⇒ Object

Parameters:

  • value (Integer)


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

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

#total_data_sentInteger

Returns:

  • (Integer)


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

def total_data_sent
  @@total_data_sent ||= 0
end

#total_data_sent=(value) ⇒ Object

Parameters:

  • value (Integer)


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

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

#total_requestsInteger

Returns:

  • (Integer)


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

def total_requests
  @@total_requests ||= 0
end

#total_requests=(value) ⇒ Object

Parameters:

  • value (Integer)


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

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