Exception: AdvancedSearch::SExp::InvalidType
- Defined in:
- lib/advanced_search/sexp/invalid_type.rb
Overview
A nicer presentation of a ‘NameError`.
Instance Method Summary collapse
-
#initialize(type, name_error) ⇒ InvalidType
constructor
private
A new instance of InvalidType.
-
#message ⇒ Object
String.
Constructor Details
#initialize(type, name_error) ⇒ InvalidType
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of InvalidType.
10 11 12 13 |
# File 'lib/advanced_search/sexp/invalid_type.rb', line 10 def initialize(type, name_error) @type = type @name_error = name_error end |
Instance Method Details
#message ⇒ Object
Returns String.
17 18 19 20 21 22 23 24 |
# File 'lib/advanced_search/sexp/invalid_type.rb', line 17 def format( 'Invalid S-expression type: %s (%s) Valid types are: %s', @type, @name_error., valid_types.join(', ') ) end |