Module: Navable::InstanceMethodsForNavables
- Defined in:
- app/models/navable.rb
Instance Method Summary collapse
- #is_navable? ⇒ Boolean
- #nav ⇒ Object
- #nav_node ⇒ Object
- #navable? ⇒ Boolean
- #navable_children ⇒ Object
- #navnode ⇒ Object
Instance Method Details
#is_navable? ⇒ Boolean
17 18 19 |
# File 'app/models/navable.rb', line 17 def is_navable? true end |
#nav ⇒ Object
35 36 37 |
# File 'app/models/navable.rb', line 35 def nav nav_node end |
#nav_node ⇒ Object
25 26 27 28 29 |
# File 'app/models/navable.rb', line 25 def nav_node node = super node = build_nav_node unless node return node end |
#navable? ⇒ Boolean
21 22 23 |
# File 'app/models/navable.rb', line 21 def navable? is_navable? end |
#navable_children ⇒ Object
39 40 41 |
# File 'app/models/navable.rb', line 39 def navable_children children.select { |child| child.respond_to? :nav_node } end |
#navnode ⇒ Object
31 32 33 |
# File 'app/models/navable.rb', line 31 def navnode nav_node end |