Class: PackAPI::Querying::AttributeFilterFactory
- Inherits:
-
Object
- Object
- PackAPI::Querying::AttributeFilterFactory
- Includes:
- Enumerable
- Defined in:
- lib/pack_api/querying/attribute_filter_factory.rb
Instance Attribute Summary collapse
-
#attribute_map_class ⇒ Object
readonly
Returns the value of attribute attribute_map_class.
Class Method Summary collapse
Instance Method Summary collapse
- #from_api_type ⇒ Object
-
#initialize(attribute_map_class) ⇒ AttributeFilterFactory
constructor
A new instance of AttributeFilterFactory.
Constructor Details
#initialize(attribute_map_class) ⇒ AttributeFilterFactory
Returns a new instance of AttributeFilterFactory.
16 17 18 |
# File 'lib/pack_api/querying/attribute_filter_factory.rb', line 16 def initialize(attribute_map_class) @attribute_map_class = attribute_map_class end |
Instance Attribute Details
#attribute_map_class ⇒ Object (readonly)
Returns the value of attribute attribute_map_class.
14 15 16 |
# File 'lib/pack_api/querying/attribute_filter_factory.rb', line 14 def attribute_map_class @attribute_map_class end |
Class Method Details
.attribute_filter_cache ⇒ Object
10 11 12 |
# File 'lib/pack_api/querying/attribute_filter_factory.rb', line 10 def self.attribute_filter_cache @attribute_filter_cache ||= Concurrent::Map.new end |
Instance Method Details
#from_api_type ⇒ Object
20 21 22 23 24 |
# File 'lib/pack_api/querying/attribute_filter_factory.rb', line 20 def from_api_type filterable_attributes.each do |attribute_name, attribute_type| yield define_filter(attribute_name, attribute_type) end end |