Class: Stats::Min

Inherits:
StatsType show all
Defined in:
lib/shades/stats.rb

Instance Method Summary collapse

Methods inherited from StatsType

get

Constructor Details

#initialize(d) ⇒ Min

Returns a new instance of Min.



76
77
78
# File 'lib/shades/stats.rb', line 76

def initialize(d)
  @min = d
end

Instance Method Details

#add(d) ⇒ Object



80
81
82
# File 'lib/shades/stats.rb', line 80

def add(d)
  @min = [@min, d].min
end

#get_valueObject



92
93
94
# File 'lib/shades/stats.rb', line 92

def get_value
  @min
end

#merge(stat) ⇒ Object



88
89
90
# File 'lib/shades/stats.rb', line 88

def merge(stat)
  @min = [@min, stat.get_value].min
end

#remove(d) ⇒ Object



84
85
86
# File 'lib/shades/stats.rb', line 84

def remove(d)
  puts "ignoring remove"
end