-
-
Save pikesley/5780337 to your computer and use it in GitHub Desktop.
Revisions
-
Sam Pikesley revised this gist
Jun 14, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,8 @@ uri = "http://data.gov.uk/dataset/water-framework-directive-lake-waterbodies-wfs" rdf = nil doc = Nokogiri::HTML(open(uri)) doc.search('link[rel=alternate]').each do |e| -
pezholio revised this gist
Jun 14, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,12 +7,12 @@ doc.search('link[rel=alternate]').each do |e| if e[:type] == "application/rdf+xml" puts "rdf should be #{e[:href]}" rdf = e[:href] end end # rdf should be http://data.gov.uk/dataset/water-framework-directive-lake-waterbodies-wfs.rdf # > rdf # NameError: undefined local variable or method `rdf' for main:Object -
pezholio revised this gist
Jun 14, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,6 +12,8 @@ end end # I'm true! # > rdf # NameError: undefined local variable or method `rdf' for main:Object -
pezholio revised this gist
Jun 14, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,7 @@ doc.search('link[rel=alternate]').each do |e| if e[:type] == "application/rdf+xml" puts "I'm true!" rdf = e[:href] end end -
pezholio created this gist
Jun 14, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ require 'nokogiri' require 'open-uri' uri = "http://data.gov.uk/dataset/water-framework-directive-lake-waterbodies-wfs" doc = Nokogiri::HTML(open(uri)) doc.search('link[rel=alternate]').each do |e| if e[:type] == "application/rdf+xml" rdf = e[:href] end end # > rdf # NameError: undefined local variable or method `rdf' for main:Object rdf = "foo" # > rdf # => "foo" # WAT