Class: SystemInspector::Memory
- Inherits:
-
Object
- Object
- SystemInspector::Memory
- Defined in:
- lib/instrumental_tools/system_inspector.rb
Instance Attribute Summary collapse
-
#current_values ⇒ Object
readonly
Returns the value of attribute current_values.
-
#past_values ⇒ Object
readonly
Returns the value of attribute past_values.
Instance Method Summary collapse
- #cycle ⇒ Object
-
#initialize ⇒ Memory
constructor
A new instance of Memory.
- #retrieve(attribute) ⇒ Object
- #store(attribute, value) ⇒ Object
Constructor Details
#initialize ⇒ Memory
Returns a new instance of Memory.
52 53 54 55 |
# File 'lib/instrumental_tools/system_inspector.rb', line 52 def initialize @past_values = {} @current_values = {} end |
Instance Attribute Details
#current_values ⇒ Object (readonly)
Returns the value of attribute current_values.
50 51 52 |
# File 'lib/instrumental_tools/system_inspector.rb', line 50 def current_values @current_values end |
#past_values ⇒ Object (readonly)
Returns the value of attribute past_values.
50 51 52 |
# File 'lib/instrumental_tools/system_inspector.rb', line 50 def past_values @past_values end |
Instance Method Details
#cycle ⇒ Object
65 66 67 68 |
# File 'lib/instrumental_tools/system_inspector.rb', line 65 def cycle @past_values = @current_values @current_values = {} end |
#retrieve(attribute) ⇒ Object
61 62 63 |
# File 'lib/instrumental_tools/system_inspector.rb', line 61 def retrieve(attribute) @past_values[attribute] end |
#store(attribute, value) ⇒ Object
57 58 59 |
# File 'lib/instrumental_tools/system_inspector.rb', line 57 def store(attribute, value) @current_values[attribute] = value end |