Method: MdnQuery::Entry#content

Defined in:
lib/mdn_query/entry.rb

#contentMdnQuery::Document

Returns the content of the entry.

The content is fetched from the Mozilla Developer Network’s documentation. The fetch occurs only once and subsequent calls return the previously fetched content.

Returns:

Raises:



42
43
44
45
# File 'lib/mdn_query/entry.rb', line 42

def content
  return @content unless @content.nil?
  @content = MdnQuery::Document.from_url(url)
end