Module: Tb::Func::Min
- Defined in:
- lib/tb/func.rb
Class Method Summary collapse
Class Method Details
.aggregate(vc) ⇒ Object
87 |
# File 'lib/tb/func.rb', line 87 def Min.aggregate(vc) vc.nil? ? nil : vc.first end |
.call(vc1, vc2) ⇒ Object
86 |
# File 'lib/tb/func.rb', line 86 def Min.call(vc1, vc2) vc1.nil? ? vc2 : vc2.nil? ? vc1 : (vc1.last <=> vc2.last) <= 0 ? vc1 : vc2 end |
.start(value) ⇒ Object
85 |
# File 'lib/tb/func.rb', line 85 def Min.start(value) value.nil? ? nil : [value, Tb::Func.smart_cmp_value(value)] end |