Class: BreadcrumbsOnRails::Breadcrumbs::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/breadcrumbs_on_rails/breadcrumbs.rb

Overview

Represents a navigation element in the breadcrumb collection.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, path, options = {}) ⇒ Element

Initializes the Element with given parameters.

Parameters:

  • name (String)

    The element/link name.

  • path (String)

    The element/link URL.

  • options (Hash) (defaults to: {})

    The element/link URL.



119
120
121
122
123
# File 'lib/breadcrumbs_on_rails/breadcrumbs.rb', line 119

def initialize(name, path, options = {})
  self.name     = name
  self.path     = path
  self.options  = options
end

Instance Attribute Details

#nameString

Returns The element/link name.

Returns:

  • (String)

    The element/link name.



106
107
108
# File 'lib/breadcrumbs_on_rails/breadcrumbs.rb', line 106

def name
  @name
end

#optionsHash

Returns The element/link URL.

Returns:

  • (Hash)

    The element/link URL.



110
111
112
# File 'lib/breadcrumbs_on_rails/breadcrumbs.rb', line 110

def options
  @options
end

#pathString

Returns The element/link URL.

Returns:

  • (String)

    The element/link URL.



108
109
110
# File 'lib/breadcrumbs_on_rails/breadcrumbs.rb', line 108

def path
  @path
end