Class: AmaLayout::Navigation
- Inherits:
-
Object
- Object
- AmaLayout::Navigation
- Includes:
- ActiveModel::Model, Draper::Decoratable
- Defined in:
- lib/ama_layout/navigation.rb
Instance Attribute Summary collapse
-
#current_url ⇒ Object
Returns the value of attribute current_url.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
Instance Attribute Details
#current_url ⇒ Object
Returns the value of attribute current_url.
6 7 8 |
# File 'lib/ama_layout/navigation.rb', line 6 def current_url @current_url end |
#user ⇒ Object
Returns the value of attribute user.
6 7 8 |
# File 'lib/ama_layout/navigation.rb', line 6 def user @user end |
Instance Method Details
#items ⇒ Object
21 22 23 24 25 |
# File 'lib/ama_layout/navigation.rb', line 21 def items .fetch(user.try(:navigation), []).map do |n| .new n.merge({ current_url: current_url}) end end |