class

Glimmer::Source::URLSource

Inherits Reference < Object

URLSource fetches Markdown content from HTTP/HTTPS URLs.

Constructors

new(url : String)
Source

Class methods

detect_source(input : String) : Symbol

Detects the source type from a string.

Source
normalize_url(input : String) : String

Normalizes shorthand repository URLs to valid HTTPS URLs.

Source

Instance methods

name

Returns a human-readable name for this source.

Source
read

Fetches the content from the URL and returns it as a string.

Source
resolve_urls

Resolves GitHub/GitLab URLs to raw content URL(s).

Returns multiple URLs for fallback (e.g. main then master branch).

Source
url=(url : String)
Source
valid?

Returns true if the URL syntax is valid and uses HTTP or HTTPS.

Source