3 ms·
class Array def method_missing(m, *args, &block) self.map {|x| x.send(m)} end end users.first_name
by GregBuchholz 10y ago
class Array
def method_missing(m, *args, &block)
self.map {|x| x.send(m)}
end
end
users.first_name
- coderzach 10y agousing `x` as a variable name is not the reason this code is terrible.