Class: RubyUtils::ExtremeValues
- Inherits:
-
Object
- Object
- RubyUtils::ExtremeValues
- Defined in:
- lib/ruby_utils/statistic.rb
Overview
simple helper class to store the minimal and maximal value for a given data set
Instance Attribute Summary collapse
-
#maximum ⇒ Numeric
readonly
The determined maximum value.
-
#minimum ⇒ Numeric
readonly
The determined minimum value.
Instance Method Summary collapse
-
#initialize(min_value, max_value) ⇒ ExtremeValues
constructor
initialization.
Constructor Details
#initialize(min_value, max_value) ⇒ ExtremeValues
initialization
116 117 118 119 |
# File 'lib/ruby_utils/statistic.rb', line 116 def initialize(min_value, max_value) @minimum = min_value @maximum = max_value end |
Instance Attribute Details
#maximum ⇒ Numeric (readonly)
Returns the determined maximum value.
109 110 111 |
# File 'lib/ruby_utils/statistic.rb', line 109 def maximum @maximum end |
#minimum ⇒ Numeric (readonly)
Returns the determined minimum value.
111 112 113 |
# File 'lib/ruby_utils/statistic.rb', line 111 def minimum @minimum end |