Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #3489

Can I Add quotes to values in a array? or include quotes..

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!talisker.lacave.net!lacave.net!not-for-mail
From Richard Sandoval <skolopen@yahoo.com>
Newsgroups comp.lang.ruby
Subject Can I Add quotes to values in a array? or include quotes..
Date Mon, 25 Apr 2011 22:16:13 -0500
Organization Service de news de lacave.net
Lines 23
Message-ID <1564dc8f34b4628de596a92894889790@ruby-forum.com> (permalink)
NNTP-Posting-Host bristol.highgroove.com
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Trace talisker.lacave.net 1303791815 53002 65.111.164.187 (26 Apr 2011 04:23:35 GMT)
X-Complaints-To abuse@lacave.net
NNTP-Posting-Date Tue, 26 Apr 2011 04:23:35 +0000 (UTC)
X-Received-From This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway
X-Mail-Count 382176
X-Ml-Name ruby-talk
X-Rubymirror Yes
X-Ruby-Talk <1564dc8f34b4628de596a92894889790@ruby-forum.com>
Xref x330-a1.tempe.blueboxinc.net comp.lang.ruby:3489

Show key headers only | View raw


Please advise on my situation.

I have something like this


A Yaml file that contains


Application:
 - App1
 - App2


When I puts that yaml file for that application field, I get App1,App2.
How can I add quotes to each application.  I'd like my output to be
"App1,App2" which includes the quotes in the output

I was thinking maybe through the use of gsub but I'm still new to ruby.
Could someone provide some aid?

-- 
Posted via http://www.ruby-forum.com/.

Back to comp.lang.ruby | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Can I Add quotes to values in a array? or include quotes.. Richard Sandoval <skolopen@yahoo.com> - 2011-04-25 22:16 -0500
  Re: Can I Add quotes to values in a array? or include quotes.. Nikita Baksalyar <n.baksalyar@yandex.ru> - 2011-04-25 23:49 -0500
  Re: Can I Add quotes to values in a array? or include quotes.. 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-26 12:26 -0500
    Re: Can I Add quotes to values in a array? or include quotes.. Alexander McMillan <alexandermcmillan@hotmail.com> - 2011-04-26 12:50 -0500
      Re: Can I Add quotes to values in a array? or include quotes.. 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-26 16:30 -0500
  Re: Can I Add quotes to values in a array? or include quotes.. 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-26 12:43 -0500

csiph-web