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
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.
8 9 10 |
# File 'lib/madness/breadcrumbs.rb', line 8 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/madness/breadcrumbs.rb', line 6 def path @path end |
Instance Method Details
#links ⇒ Object
12 13 14 |
# File 'lib/madness/breadcrumbs.rb', line 12 def links path == "" ? [] : end |