Microformat
Reads Microformats from HTML documents
Installation
Add this line to your application's Gemfile:
gem "microformat"And then execute:
$ bundle
Or install it yourself as:
$ gem install microformat
Usage
You can parse a document (or partial document), providing the HTML as a string:
html = "<html>...</html>"
Microformat.parse(html) # => Microformat::CollectionOr provide a Nokogiri element:
require "nokogiri"
html = "<html>...</html>"
doc = Nokogiri::HTML(html)
element = doc.css("body")
Microformat.parse(element)
# => Microformat::CollectionContributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request