Exception: QueryHelper::InvalidSortParamError
- Inherits:
-
StandardError
- Object
- StandardError
- QueryHelper::InvalidSortParamError
- Defined in:
- lib/query_helper/invalid_sort_param_error.rb
Instance Attribute Summary collapse
-
#sort_string ⇒ Object
readonly
Returns the value of attribute sort_string.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(msg = 'Invalid sort param', sort_string = '') ⇒ InvalidSortParamError
constructor
A new instance of InvalidSortParamError.
Constructor Details
#initialize(msg = 'Invalid sort param', sort_string = '') ⇒ InvalidSortParamError
Returns a new instance of InvalidSortParamError.
6 7 8 9 |
# File 'lib/query_helper/invalid_sort_param_error.rb', line 6 def initialize(msg='Invalid sort param', sort_string='') @sort_string = sort_string super(msg) end |
Instance Attribute Details
#sort_string ⇒ Object (readonly)
Returns the value of attribute sort_string.
4 5 6 |
# File 'lib/query_helper/invalid_sort_param_error.rb', line 4 def sort_string @sort_string end |
Instance Method Details
#as_json ⇒ Object
11 12 13 14 15 16 |
# File 'lib/query_helper/invalid_sort_param_error.rb', line 11 def as_json { 'error' => , 'sort_param' => sort_string } end |