Class: Array

Inherits:
Object show all
Defined in:
lib/ayril/core_ext/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#invoke(*args) ⇒ Object Also known as: send_all, pluck



38
# File 'lib/ayril/core_ext/core_ext.rb', line 38

def invoke(*args) self.map { |item| item.send *args } end

#invoke!(*args) ⇒ Object Also known as: send_all!, pluck!



39
# File 'lib/ayril/core_ext/core_ext.rb', line 39

def invoke!(*args) self.map! { |item| item.send *args } end