Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created April 13, 2016 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/807d625136651867194079eb9fa03093 to your computer and use it in GitHub Desktop.
Save anonymous/807d625136651867194079eb9fa03093 to your computer and use it in GitHub Desktop.
output = my_command_which_returns_string
lines = output.split(/\n/, -1)
names = lines.map{|str| str.split.last}
for name in names
puts "NAME = #{name}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment