Class: Nesta::Menu
- Inherits:
-
Object
- Object
- Nesta::Menu
- Defined in:
- lib/nesta/models.rb
Constant Summary collapse
- INDENT =
" " * 2
Class Method Summary collapse
Class Method Details
.for_path(path) ⇒ Object
372 373 374 375 376 377 378 379 |
# File 'lib/nesta/models.rb', line 372 def self.for_path(path) path.sub!(Regexp.new('^/'), '') if path.empty? else (, path) end end |
.full_menu ⇒ Object
359 360 361 362 363 364 365 366 |
# File 'lib/nesta/models.rb', line 359 def self. = [] = Nesta::Config.content_path('menu.txt') if File.exist?() File.open() { |file| (, file, 0) } end end |
.top_level ⇒ Object
368 369 370 |
# File 'lib/nesta/models.rb', line 368 def self.top_level .reject { |item| item.is_a?(Array) } end |