diff --git a/README.md b/README.md index c164c56..3a2463a 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,15 @@ collection = Microformats2.parse(source) collection.card.name.to_s #=> "Jessica Lynn Suttles" # using plural accessors collection.cards.first.names.first.to_s #=> "Jessica Lynn Suttles" + +source = '
+

Microformats 2

+

Jessica Lynn Suttles

+
' +collection = Microformats2.parse(source) +collection.entry.name.to_s #=> "Microformats 2" +# accessing nested microformats +collection.entry.author.format.name.to_s #=> "Jessica Lynn Suttles" ``` * `source` can be a URL, filepath, or HTML