Class: Bridgetown::Webfinger::LinkRelationType
- Defined in:
- lib/bridgetown/webfinger/link_relation_type.rb
Overview
Wraps the type of a Link relation
Constant Summary collapse
- REGISTERED =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
The list of relation types, as registered with IANA
This constant can be regenerated with the
data:link_relationsRake task. Set.new(%w[ about acl alternate amphtml appendix apple-touch-icon apple-touch-startup-image archives author blocked-by bookmark canonical chapter cite-as collection contents convertedfrom copyright create-form current describedby describes disclosure dns-prefetch duplicate edit edit-form edit-media enclosure external first glossary help hosts hub icon index intervalafter intervalbefore intervalcontains intervaldisjoint intervalduring intervalequals intervalfinishedby intervalfinishes intervalin intervalmeets intervalmetby intervaloverlappedby intervaloverlaps intervalstartedby intervalstarts item last latest-version license linkset lrdd manifest mask-icon media-feed memento micropub modulepreload monitor monitor-group next next-archive nofollow noopener noreferrer opener openid2.local_id openid2.provider original p3pv1 payment pingback preconnect predecessor-version prefetch preload prerender prev preview previous prev-archive privacy-policy profile publication related restconf replies ruleinput search section self service service-desc service-doc service-meta sip-trunking-capability sponsored start status stylesheet subsection successor-version sunset tag terms-of-service timegate timemap type ugc up version-history via webmention working-copy working-copy-of ]).freeze
Class Method Summary collapse
-
.parse(rel) ⇒ LinkRelationType?
private
Parses a maybe-returns a LinkRelationType when the value is one.
Methods included from Logging
Class Method Details
.parse(rel) ⇒ LinkRelationType?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Parses a maybe-returns a Bridgetown::Webfinger::LinkRelationType when the value is one
Link relation types may either be a URI to a relation type description or a value registered with IANA.
152 153 154 155 156 |
# File 'lib/bridgetown/webfinger/link_relation_type.rb', line 152 def self.parse(rel) return unless Webfinger.uri?(rel) || REGISTERED.include?(rel) new(rel) end |