Exception: NoBrainer::Error::CannotUseIndex
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- NoBrainer::Error::CannotUseIndex
- Defined in:
- lib/no_brainer/error.rb
Instance Attribute Summary collapse
-
#index_name ⇒ Object
Returns the value of attribute index_name.
Instance Method Summary collapse
-
#initialize(index_name) ⇒ CannotUseIndex
constructor
A new instance of CannotUseIndex.
- #message ⇒ Object
Constructor Details
#initialize(index_name) ⇒ CannotUseIndex
Returns a new instance of CannotUseIndex.
63 64 65 |
# File 'lib/no_brainer/error.rb', line 63 def initialize(index_name) @index_name = index_name end |
Instance Attribute Details
#index_name ⇒ Object
Returns the value of attribute index_name.
62 63 64 |
# File 'lib/no_brainer/error.rb', line 62 def index_name @index_name end |
Instance Method Details
#message ⇒ Object
67 68 69 70 71 72 73 |
# File 'lib/no_brainer/error.rb', line 67 def if index_name == true "Cannot use any indexes" else "Cannot use index #{index_name}" end end |