Class: Phronomy::Filter::Base
- Inherits:
-
Object
- Object
- Phronomy::Filter::Base
- Defined in:
- lib/phronomy/filter/base.rb
Overview
Abstract base class for value filters.
A filter may either transform a value (return the new value) or block it (raise Phronomy::FilterBlockError). The same filter instance can be registered at multiple call sites — input, output, and tool result.
Direct Known Subclasses
Instance Method Summary collapse
-
#call(value, **_context) ⇒ Object
Process +value+ and return the (possibly transformed) result.
Instance Method Details
#call(value, **_context) ⇒ Object
Process +value+ and return the (possibly transformed) result.
The +context+ keyword arguments vary by call site:
- Tool result: +{ tool_name: String, args: Hash }+
- Input / output: +(empty)+
41 42 43 |
# File 'lib/phronomy/filter/base.rb', line 41 def call(value, **_context) raise NotImplementedError, "#{self.class}#call is not implemented" end |