Class: Breadcrumb
- Inherits:
-
Object
- Object
- Breadcrumb
- Defined in:
- app/models/breadcrumb.rb
Overview
Breadcrumb model
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(name, path) ⇒ Breadcrumb
constructor
A new instance of Breadcrumb.
- #link? ⇒ Boolean
Constructor Details
#initialize(name, path) ⇒ Breadcrumb
Returns a new instance of Breadcrumb.
7 8 9 10 |
# File 'app/models/breadcrumb.rb', line 7 def initialize(name, path) @name = name @path = path end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'app/models/breadcrumb.rb', line 5 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'app/models/breadcrumb.rb', line 5 def path @path end |
Instance Method Details
#link? ⇒ Boolean
12 13 14 |
# File 'app/models/breadcrumb.rb', line 12 def link? @path.present? end |