Jet Koten wrote:
> Alexander Jesner wrote:
>> On 02/26/2010 22:20, Jet Koten wrote:
>>> end of my code:
>>>
>>> "Like New"
>>> "Very Good"
>>> "Good"
>>> "Acceptable"
>>>   
>> 
>> If you just want to ged rid of the word "Used", you could use something
>> like this:
>> 
>>    text = "Used - Like New"
>>    text[7, text.length]
>> => "Like New"
>> 
>> Regards
> 
> It works! 

Hmmm, well, actually, it kind of works. I did this:

result.each do |item|
  price = item.search(".price").text.match(/\d+[.]\d+/)
  condition = item.search(".condition").text
  rating = item.search(".rating a").text.to_i
  seller = item.search(".seller b").text
  puts "#{price} - #{condition.chomp[8, condition.length]} - #{rating} - 
#{seller}"
end

and then realized I actually need to be able to just put #{condition} by 
itself in the puts and not use #{condition.chomp[8, condition.length]}

but, I tried and found that I don't know how to adjust the code in the 
block above. Can someone help again?
-- 
Posted via http://www.ruby-forum.com/.