Article 5S7DT Converting output of one function into array and feed value into variable in other function in ruby

Converting output of one function into array and feed value into variable in other function in ruby

by
Sivagurunathan
from LinuxQuestions.org on (#5S7DT)
For one of ruby programming logic, am trying to convert the string output of one function into an array and from array have to feed the values to the variables declared in other function of the program

Code:response.each do |instance |
print "#{instance.private_ip_address}"
print "\n"
end

10.1.1.1
10.1.1.2
10.1.1.3This output should be converted into array and feed as values in separate function of same program

Code:def run_me
::
::
filter_pattern = '[w1,w2,w3,w4,w5,w6!="*#{array[0]}*"&&w6!="*#{array[1]}*&&w6!="*#{array[2]}*"]'latest?d=yIl2AUoC8zA latest?i=0mzM079sSmo:VG66WkgwOmk:F7zBnMy latest?i=0mzM079sSmo:VG66WkgwOmk:V_sGLiP latest?d=qj6IDK7rITs latest?i=0mzM079sSmo:VG66WkgwOmk:gIN9vFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments