Class: Madness::Breadcrumbs
- Inherits:
-
Object
- Object
- Madness::Breadcrumbs
- Defined in:
- lib/madness/breadcrumbs.rb
Overview
Handle breadcumbs generation by converting a path to an array of links
Defined Under Namespace
Classes: Breadcrumb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path) ⇒ Breadcrumbs
constructor
A new instance of Breadcrumbs.
- #links ⇒ Object
Constructor Details
#initialize(path) ⇒ Breadcrumbs
Returns a new instance of Breadcrumbs.
11 12 13 |
# File 'lib/madness/breadcrumbs.rb', line 11 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
9 10 11 |
# File 'lib/madness/breadcrumbs.rb', line 9 def path @path end |
Instance Method Details
#links ⇒ Object
15 16 17 |
# File 'lib/madness/breadcrumbs.rb', line 15 def links path == '' ? [] : end |