lib/middlemac/private.rb
#--------------------------------------------------------
# This accessor for @md_links_b lazily populates the
# backing variable and buffers it for repeated use.
# In the event of file changes, a server restart is
# needed.
#
# @param [Sitemap::Resource] resource The page for which
#   the data are being requested.
# @return [String] Returns the Markdown reference list.
# @!visibility private
#--------------------------------------------------------
This accessor for @md_links_b lazily populates the
backing variable and buffers it for repeated use.
In the event of file changes, a server restart is
needed.
This accessor for @md_links_b lazily populates the backing variable and buffers it for repeated use . In the event of file changes a server restart is needed .
def md_links_impl(resource)
    locale = resource.hb_locale.to_sym
    unless @md_links_b[locale]
      @md_links_b[locale] = get_link_data(resource, 'text/html', 'application/xhtml')
                                .collect { |l|
                                  if l[:title]
                                    "[#{l[:reference]}]: #{l[:hb_link]} \"#{l[:title]}\""
                                  else
                                    "[#{l[:reference]}]: #{l[:hb_link]}"
                                  end
                                }
                                .join("\n")
    end
    @md_links_b[locale]
  end
def md_links_impl ( resource ) locale = resource . hb_locale . to_sym unless @md_links_b [ locale ] @md_links_b [ locale ] = get_link_data ( resource , 'text/html' , 'application/xhtml' ) . collect { | l | if l [ :title ] "[#{l[:reference]}]: #{l[:hb_link]} \"#{l[:title]}\"" else "[#{l[:reference]}]: #{l[:hb_link]}" end } . join ( "\n" ) end @md_links_b [ locale ] end
This accessor for @md_links_b lazily populates the
backing variable and buffers it for repeated use.
This accessor for @md_links_b lazily populates the backing variable and buffers it for repeated use .
Returns the Markdown reference list.
Returns the Markdown reference list .
String
resource
<not_specific>
<not_specific>
resource The page for which the data are being requested.
resource The page for which the data are being requested .
!visibility
None