Class: Log::Analyzer::Endpoint::Value

Inherits:
Object
  • Object
show all
Defined in:
lib/log-analyzer/endpoint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeValue

Returns a new instance of Value.



35
36
37
# File 'lib/log-analyzer/endpoint.rb', line 35

def initialize
  @total = 0
end

Instance Attribute Details

#maxObject

Returns the value of attribute max.



33
34
35
# File 'lib/log-analyzer/endpoint.rb', line 33

def max
  @max
end

#minObject

Returns the value of attribute min.



33
34
35
# File 'lib/log-analyzer/endpoint.rb', line 33

def min
  @min
end

#totalObject

Returns the value of attribute total.



33
34
35
# File 'lib/log-analyzer/endpoint.rb', line 33

def total
  @total
end

Instance Method Details

#store(value) ⇒ Object



47
48
49
50
51
# File 'lib/log-analyzer/endpoint.rb', line 47

def store(value)
  self.total += value
  self.min = value
  self.max = value
end