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
321 322 323 324 325 326 327 328 |
# File 'lib/nesta/models.rb', line 321 def self.for_path(path) path.sub!(Regexp.new('^/'), '') if path.empty? else (, path) end end |
.full_menu ⇒ Object
308 309 310 311 312 313 314 315 |
# File 'lib/nesta/models.rb', line 308 def self. = [] = Nesta::Config.content_path('menu.txt') if File.exist?() File.open() { |file| (, file, 0) } end end |
.top_level ⇒ Object
317 318 319 |
# File 'lib/nesta/models.rb', line 317 def self.top_level .reject { |item| item.is_a?(Array) } end |