How to insert a delimiter while parsing a class with Nokogiri
<p>I'm using Nokogiri and Selenium Webdriver to parse the full contents of a class on a web page:</p>

<pre><code>require "selenium-webdriver"
require "nokogiri"
browser = Selenium::WebDriver.for :chrome
browser.get "https://jsfiddle.net"
doc = Nokogiri::HTML.parse(browser.page_source)
puts doc.xpath(".//*[@class='aiButton']").inner_text
</code></pre>

<p>There are elements with class <code>aiButton</code>, containing text like "Run", "Save", "Update", etc. This is the result in my terminal:</p>

<pre><code>&gt; RunSaveUpdateForkTidyCollaborateSign in
</code></pre>

<p>Is there a way I can print the contents but include a delimiter, like a space or comma or something, between the elements? My preferred output would be:</p>

<pre><code>&gt; Run Save Update Fork Tidy Collaborate Sign in
</code></pre>