Module: Squeezable::InstanceMethods
- Defined in:
- lib/squeeze.rb
Instance Method Summary collapse
Instance Method Details
#squeeze(dataset = nil) ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/squeeze.rb', line 22 def squeeze(dataset=nil) unless dataset if meth = self.class.squeezable[:dataset_method] dataset ||= self.send(meth) else raise ArgumentError, "Must give #squeeze a dataset" end end squeezer.reduce(dataset) end |