Exception: Curly::PresenterNameError

Inherits:
Error
  • Object
show all
Defined in:
lib/curly/presenter_name_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(original_exception, name) ⇒ PresenterNameError

Returns a new instance of PresenterNameError.



7
8
9
10
# File 'lib/curly/presenter_name_error.rb', line 7

def initialize(original_exception, name)
  @name = name
  @original_exception = original_exception
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/curly/presenter_name_error.rb', line 5

def name
  @name
end

#original_exceptionObject (readonly)

Returns the value of attribute original_exception.



5
6
7
# File 'lib/curly/presenter_name_error.rb', line 5

def original_exception
  @original_exception
end

Instance Method Details

#messageObject



12
13
14
# File 'lib/curly/presenter_name_error.rb', line 12

def message
  "cannot use context `#{name}`, could not find matching presenter class"
end