Open catmando opened 7 years ago
Adapted from active record:
module ActiveRecord module InstanceMethods def slice(methods) Hash[methods.map! { |method| [method, send(method)] }] end end end
Adapted from active record: