Skip to content Skip to sidebar Skip to footer
Showing posts with the label Ruby

Hpricot, Get All Text From Document

I have just started learning Ruby. Very cool language, liking it a lot. I am using the very handy … Read more Hpricot, Get All Text From Document

How To Insert A Block Every Several Div With Haml?

I want to insert a div.row every three blocks in order to wrap three span together for the followin… Read more How To Insert A Block Every Several Div With Haml?

Strip Text From Html Document Using Ruby

There are lots of examples of how to strip HTML tags from a document using Ruby, Hpricot and Nokogi… Read more Strip Text From Html Document Using Ruby

Repairing Invalid Html With Nokogiri (removing Invalid Tags)

I'm trying to tidy some retrieved HTML using the tidy-ext gem. However, it fails when the HTML … Read more Repairing Invalid Html With Nokogiri (removing Invalid Tags)

Haml .each Function For Variables

I have around 30+ variables that contain an array with multiple strings inside of it. 1 variable =… Read more Haml .each Function For Variables

How To Parse Xml With Nokogiri Without Losing Html Entities?

If you look at the output below in the after section ruby is removing all the html entities. How to… Read more How To Parse Xml With Nokogiri Without Losing Html Entities?

Save All User Entries From Html Text Built Off A Loop Using Ruby And Sinatra

I am creating a web page that displays a table. It also has four columns at the end of each record … Read more Save All User Entries From Html Text Built Off A Loop Using Ruby And Sinatra

Extract Data From Html Table With Mechanize

First of all, here is the sample html table : Kangchenjunga 8,586m Solution 1: More succint v… Read more Extract Data From Html Table With Mechanize