class Loaf::Crumb

Basic crumb container for internal use @api private

Attributes

match[R]
name[R]
url[R]

Public Class Methods

new(name, url, options = {}) click to toggle source
# File lib/loaf/crumb.rb, line 13
def initialize(name, url, options = {})
  @name  = name || raise_name_error
  @url   = url || raise_url_error
  @match = options.fetch(:match, Loaf.configuration.match)
  freeze
end

Public Instance Methods

raise_name_error() click to toggle source
# File lib/loaf/crumb.rb, line 20
def raise_name_error
  raise ArgumentError, 'breadcrumb first argument, `name`, cannot be nil'
end
raise_url_error() click to toggle source
# File lib/loaf/crumb.rb, line 24
def raise_url_error
  raise ArgumentError, 'breadcrumb second argument, `url`, cannot be nil'
end