Exception: RakeRoutesNormalizer::ExceptionWithDefaultMessage

Inherits:
Exception
  • Object
show all
Defined in:
lib/rake_routes_normalizer/exception_with_default_message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ExceptionWithDefaultMessage

Returns a new instance of ExceptionWithDefaultMessage.



4
5
6
7
8
9
10
# File 'lib/rake_routes_normalizer/exception_with_default_message.rb', line 4

def initialize(options={})
  @options = options
  message = options.is_a?(String) ?
    options :
    "#{self.class}. Got #{options.inspect}"
  super(message)
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/rake_routes_normalizer/exception_with_default_message.rb', line 3

def options
  @options
end