Class: PackAPI::Querying::DiscoverableFilter
- Inherits:
-
AbstractFilter
show all
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/pack_api/querying/discoverable_filter.rb
Overview
This class is the base class for all discoverable filters, which can produce a definition that specifies usage.
Class Method Summary
collapse
Instance Method Summary
collapse
#apply_to, #present?
Class Method Details
.definition ⇒ Object
29
30
31
|
# File 'lib/pack_api/querying/discoverable_filter.rb', line 29
def self.definition(**)
raise NotImplementedError
end
|
.filter_name ⇒ Object
13
14
15
|
# File 'lib/pack_api/querying/discoverable_filter.rb', line 13
def self.filter_name
raise NotImplementedError
end
|
.type ⇒ Object
21
22
23
|
# File 'lib/pack_api/querying/discoverable_filter.rb', line 21
def self.type
raise NotImplementedError
end
|
Instance Method Details
#filter_name ⇒ Object
9
10
11
|
# File 'lib/pack_api/querying/discoverable_filter.rb', line 9
def filter_name
self.class.filter_name
end
|
#to_h ⇒ Object
25
26
27
|
# File 'lib/pack_api/querying/discoverable_filter.rb', line 25
def to_h
raise NotImplementedError
end
|
#type ⇒ Object
17
18
19
|
# File 'lib/pack_api/querying/discoverable_filter.rb', line 17
def type
self.class.type
end
|