Class: BreadcrumbsOnRailsMicrodataBuilder::Breadcrumbs::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/breadcrumbs_on_rails_microdata_builder/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.



91
92
93
94
95
# File 'lib/breadcrumbs_on_rails_microdata_builder/breadcrumbs.rb', line 91

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.



78
79
80
# File 'lib/breadcrumbs_on_rails_microdata_builder/breadcrumbs.rb', line 78

def name
  @name
end

#optionsHash

Returns The element/link URL.

Returns:

  • (Hash)

    The element/link URL.



82
83
84
# File 'lib/breadcrumbs_on_rails_microdata_builder/breadcrumbs.rb', line 82

def options
  @options
end

#pathString

Returns The element/link URL.

Returns:

  • (String)

    The element/link URL.



80
81
82
# File 'lib/breadcrumbs_on_rails_microdata_builder/breadcrumbs.rb', line 80

def path
  @path
end