Class: Para::Breadcrumbs::Manager
- Inherits:
-
Object
- Object
- Para::Breadcrumbs::Manager
- Includes:
- Enumerable
- Defined in:
- lib/para/breadcrumbs/manager.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
Instance Method Summary collapse
- #add(identifier, path = nil, *args) ⇒ Object
- #breadcrumbs ⇒ Object
- #each(&block) ⇒ Object
-
#initialize(controller) ⇒ Manager
constructor
A new instance of Manager.
Constructor Details
#initialize(controller) ⇒ Manager
Returns a new instance of Manager.
10 11 12 |
# File 'lib/para/breadcrumbs/manager.rb', line 10 def initialize(controller) @controller = controller end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
6 7 8 |
# File 'lib/para/breadcrumbs/manager.rb', line 6 def controller @controller end |
Instance Method Details
#add(identifier, path = nil, *args) ⇒ Object
14 15 16 |
# File 'lib/para/breadcrumbs/manager.rb', line 14 def add(identifier, path = nil, *args) << Breadcrumb.new(identifier, path, controller, *args) end |
#breadcrumbs ⇒ Object
18 19 20 |
# File 'lib/para/breadcrumbs/manager.rb', line 18 def @breadcrumbs ||= [] end |
#each(&block) ⇒ Object
22 23 24 |
# File 'lib/para/breadcrumbs/manager.rb', line 22 def each(&block) .each(&block) end |