Module: WGObjectExtensions
- Included in:
- Object
- Defined in:
- lib/wice/wice_grid_core_ext.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#deep_send(*messages) ⇒ Object
takes a list of messages, sends message 1 to self, then message 2 is sent to the result of the first message, ans so on returns nil as soon as the current receiver does not respond to such a message.
Instance Method Details
#deep_send(*messages) ⇒ Object
takes a list of messages, sends message 1 to self, then message 2 is sent to the result of the first message, ans so on returns nil as soon as the current receiver does not respond to such a message
129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/wice/wice_grid_core_ext.rb', line 129 def deep_send(*) #:nodoc: obj = self .each do || if obj.respond_to? obj = obj.send() else return nil end # return obj if obj.nil? end obj end |