lib/bunto-mentions.rb
# Public: Calculate the base URL to use for mentioning.
# The custom base URL can be defined in the config as
# bunto-mentions.base_url or bunto-mentions, and must
# be a valid URL (i.e. it must include a protocol and valid domain)
# It should _not_ have a trailing slash.
#
# config - the hash-like configuration of the document's site
#
# Returns a URL to use as the base URL for mentions.
# Defaults to the https://github.com.
Calculate the base URL to use for mentioning.
The custom base URL can be defined in the config as
bunto-mentions.base_url or bunto-mentions, and must
be a valid URL
It should _not_ have a trailing slash.

the hash-like configuration of the document's site

Returns a URL to use as the base URL for mentions.
Calculate the base URL to use for mentioning . The custom base URL can be defined in the config as bunto - mentions . base_url or bunto - mentions and must be a valid URL It should _not_ have a trailing slash . the hash - like configuration of the document ' s site Returns a URL to use as the base URL for mentions .
def mention_base(config = {})
        mention_config = config['bunto-mentions']
        case mention_config
        when nil, NilClass
          GITHUB_DOT_COM
        when String
          mention_config.to_s
        when Hash
          mention_config.fetch('base_url', GITHUB_DOT_COM)
        else
          raise InvalidBuntoMentionConfig,
            "Your bunto-mentions config has to either be a" \
            " string or a hash. It's a #{mention_config.class} right now."
        end
      end
def mention_base ( config = { } ) mention_config = config [ 'bunto-mentions' ] case mention_config when nil , NilClass GITHUB_DOT_COM when String mention_config . to_s when Hash mention_config . fetch ( 'base_url' , GITHUB_DOT_COM ) else raise InvalidBuntoMentionConfig , "Your bunto-mentions config has to either be a" " string or a hash. It's a #{mention_config.class} right now." end end
Public: Calculate the base URL to use for mentioning.
Public : Calculate the base URL to use for mentioning .
config
<not_specific>