Class: Lens::AllocationsData
- Inherits:
-
Object
- Object
- Lens::AllocationsData
- Defined in:
- lib/lens/allocations_data.rb,
lib/lens/allocations_data.rb
Instance Method Summary collapse
- #enable ⇒ Object
-
#initialize ⇒ AllocationsData
constructor
A new instance of AllocationsData.
- #objects_count ⇒ Object
- #objects_memory ⇒ Object
Constructor Details
#initialize ⇒ AllocationsData
Returns a new instance of AllocationsData.
6 7 8 9 10 |
# File 'lib/lens/allocations_data.rb', line 6 def initialize @enabled = false @objects_count = 0 @objects_memory = 0 end |
Instance Method Details
#enable ⇒ Object
12 13 14 |
# File 'lib/lens/allocations_data.rb', line 12 def enable @enabled = true end |
#objects_count ⇒ Object
16 17 18 19 |
# File 'lib/lens/allocations_data.rb', line 16 def objects_count @objects_count = calculate_objects_count if @enabled @objects_count end |
#objects_memory ⇒ Object
21 22 23 24 |
# File 'lib/lens/allocations_data.rb', line 21 def objects_memory @objects_memory = calculate_objects_memory if @enabled @objects_memory end |