Exception: Menumatic::NavigationNotFound

Inherits:
Error
  • Object
show all
Defined in:
lib/menumatic/exceptions.rb

Overview

Raised when a navigation cannot be found, usually from load_navigation

Instance Method Summary collapse

Constructor Details

#initialize(navigation = nil) ⇒ NavigationNotFound

Returns a new instance of NavigationNotFound.



9
10
11
12
# File 'lib/menumatic/exceptions.rb', line 9

def initialize(navigation = nil)
  @navigation = navigation
  @default_message = "No navigation not specified in call to render()."
end

Instance Method Details

#to_sObject



14
15
16
17
18
19
20
# File 'lib/menumatic/exceptions.rb', line 14

def to_s
  if @navigation
    "Navigation file not found: #{@navigation}"
  else
    @default_message
  end
end