Class: FeldtRuby::ValueArchive

Inherits:
Object
  • Object
show all
Defined in:
lib/feldtruby/statistics/array_archive.rb

Overview

A ValueArchive keeps basic statistics about values supplied to it in array.

Direct Known Subclasses

PositionBasedValueArchive

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeValueArchive

Returns a new instance of ValueArchive.



7
8
9
# File 'lib/feldtruby/statistics/array_archive.rb', line 7

def initialize
  @count = 0
end

Instance Attribute Details

#countObject (readonly)

Returns the number of times an array has been added to the archive.



12
13
14
# File 'lib/feldtruby/statistics/array_archive.rb', line 12

def count
  @count
end

Instance Method Details

#update(values) ⇒ Object



14
15
16
# File 'lib/feldtruby/statistics/array_archive.rb', line 14

def update(values)
  @count += 1
end