Module: MicroMicro

Defined in:
lib/micromicro.rb,
lib/micro_micro/item.rb,
lib/micro_micro/helpers.rb,
lib/micro_micro/version.rb,
lib/micro_micro/document.rb,
lib/micro_micro/property.rb,
lib/micro_micro/relationship.rb,
lib/micro_micro/implied_property.rb,
lib/micro_micro/parsers/date_time_parser.rb,
lib/micro_micro/collections/base_collection.rb,
lib/micro_micro/parsers/url_property_parser.rb,
lib/micro_micro/collections/items_collection.rb,
lib/micro_micro/parsers/base_property_parser.rb,
lib/micro_micro/parsers/image_element_parser.rb,
lib/micro_micro/collections/properties_collection.rb,
lib/micro_micro/parsers/date_time_property_parser.rb,
lib/micro_micro/parsers/plain_text_property_parser.rb,
lib/micro_micro/parsers/value_class_pattern_parser.rb,
lib/micro_micro/parsers/implied_url_property_parser.rb,
lib/micro_micro/collections/relationships_collection.rb,
lib/micro_micro/parsers/base_implied_property_parser.rb,
lib/micro_micro/parsers/implied_name_property_parser.rb,
lib/micro_micro/parsers/implied_photo_property_parser.rb,
lib/micro_micro/parsers/embedded_markup_property_parser.rb

Defined Under Namespace

Modules: Collections, Helpers, Parsers Classes: Document, ImpliedProperty, Item, Property, Relationship

Constant Summary collapse

VERSION =
"6.0.0"

Class Method Summary collapse

Class Method Details

.parse(markup, base_url) ⇒ Document

Parse a string of HTML for microformats2-encoded data.

Convenience method for MicroMicro::Document#initialize.

Examples:

MicroMicro.parse(%(<a href="/" class="h-card" rel="me">Jason Garber</a>), "https://sixtwothree.org")

Parameters:

  • markup (String)

    The HTML to parse for microformats2-encoded data.

  • base_url (String)

    The URL associated with markup. Used for relative URL resolution.

Returns:

  • (Document)

    a new instance of Document



52
53
54
# File 'lib/micromicro.rb', line 52

def self.parse(markup, base_url)
  Document.new(markup, base_url)
end