Class: Interfacets::Server::BasicRouter::Evaluator
- Inherits:
-
Object
- Object
- Interfacets::Server::BasicRouter::Evaluator
- Defined in:
- lib/interfacets/server/basic_router.rb
Instance Attribute Summary collapse
-
#bus ⇒ Object
readonly
Returns the value of attribute bus.
Instance Method Summary collapse
- #call(klass:, id:, query:, resolved_path:) ⇒ Object
-
#initialize(bus:) ⇒ Evaluator
constructor
A new instance of Evaluator.
Constructor Details
#initialize(bus:) ⇒ Evaluator
Returns a new instance of Evaluator.
8 9 10 |
# File 'lib/interfacets/server/basic_router.rb', line 8 def initialize(bus:) @bus = bus end |
Instance Attribute Details
#bus ⇒ Object (readonly)
Returns the value of attribute bus.
7 8 9 |
# File 'lib/interfacets/server/basic_router.rb', line 7 def bus @bus end |
Instance Method Details
#call(klass:, id:, query:, resolved_path:) ⇒ Object
12 13 14 15 16 |
# File 'lib/interfacets/server/basic_router.rb', line 12 def call(klass:, id:, query:, resolved_path:) klass.server_entity_class .find_for_basic_routing(id, query:, bus: bus) .tap { _1.entity.api_path = resolved_path } end |