Module: YANAPI::Common
- Included in:
- CategoryQuery, TermQuery
- Defined in:
- lib/yanapi/common.rb
Overview
This module is ment to be mixed into *Query classes to avoid duplication. It implements common parts for semantic checks.
Instance Method Summary collapse
Instance Method Details
#basic_check(params) ⇒ Object (private)
6 7 8 |
# File 'lib/yanapi/common.rb', line 6 def basic_check(params) # fake end |
#check_semantics(allowed, actual) ⇒ Object (private)
10 11 12 13 14 15 16 |
# File 'lib/yanapi/common.rb', line 10 def check_semantics(allowed, actual) actual.each_key do |param| unless allowed.include?(param.to_s) raise UserError, "The parameter #{param} is not allowed!" end end end |