Guest User

Untitled

a guest
Aug 21st, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. def with_named_ips_fixed
  2. attributes_to_fix = ['inside', 'outside']
  3. data = yield
  4. modified_values = data.output["static_nats"].map do |data_hash|
  5. hash_data = data_hash.map do |key, value| [
  6. if attributes_to_fix.include? key
  7. replace_named_ip(value)
  8. else
  9. value
  10. end
  11.  
  12. ].to_h
  13. end
  14. end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment