lib/micro_micro/document.rb in micromicro-4.0.0 vs lib/micro_micro/document.rb in micromicro-5.0.0
- old
+ new
@@ -3,14 +3,14 @@
module MicroMicro
class Document
# Parse a string of HTML for microformats2-encoded data.
#
# @example Parse a String of markup
- # MicroMicro::Document.new('<a href="/" class="h-card" rel="me">Jason Garber</a>', 'https://sixtwothree.org')
+ # MicroMicro::Document.new(%(<a href="/" class="h-card" rel="me">Jason Garber</a>), "https://sixtwothree.org")
#
# @example Parse a String of markup from a URL
- # url = 'https://tantek.com'
+ # url = "https://tantek.com"
# markup = Net::HTTP.get(URI.parse(url))
#
# doc = MicroMicro::Document.new(markup, url)
#
# @param markup [String] The HTML to parse for microformats2-encoded data.
@@ -55,10 +55,10 @@
# @return [Hash{Symbol => Array, Hash}]
def to_h
{
items: items.to_a,
rels: relationships.group_by_rel,
- 'rel-urls': relationships.group_by_url
+ "rel-urls": relationships.group_by_url
}
end
private