Class: Warped::Filter::Factory
- Inherits:
-
Object
- Object
- Warped::Filter::Factory
- Defined in:
- lib/warped/api/filter/factory.rb
Constant Summary collapse
- TYPES =
%i[string integer float decimal date time date_time boolean].freeze
Class Method Summary collapse
Instance Method Summary collapse
- #build(*args, **kwargs) ⇒ Object
-
#initialize(kind = nil) ⇒ Factory
constructor
A new instance of Factory.
Constructor Details
#initialize(kind = nil) ⇒ Factory
Returns a new instance of Factory.
12 13 14 15 |
# File 'lib/warped/api/filter/factory.rb', line 12 def initialize(kind = nil) @kind = kind validate_kind! end |
Class Method Details
.build(kind, *args, **kwargs) ⇒ Object
8 9 10 |
# File 'lib/warped/api/filter/factory.rb', line 8 def self.build(kind, *args, **kwargs) new(kind).build(*args, **kwargs) end |
Instance Method Details
#build(*args, **kwargs) ⇒ Object
17 18 19 |
# File 'lib/warped/api/filter/factory.rb', line 17 def build(*args, **kwargs) filter_class.new(*args, **kwargs) end |