Module: Ros
- Defined in:
- lib/ros/ros.rb
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.each_box_cached(&b) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/ros/ros.rb', line 40 def each_box_cached &b unless @each_box_cached unless Object.private_instance_methods(false).include?(:each_box) raise "you must define 'each_box' method!" end @each_box_cached = [] each_box do |box| @each_box_cached << box # cache ssh connection box.open_connection end end @each_box_cached.each &b end |