Class: Array
Instance Method Summary collapse
- #invoke(*args) ⇒ Object (also: #send_all, #pluck)
- #invoke!(*args) ⇒ Object (also: #send_all!, #pluck!)
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 |