Class: Interfacets::Client::Channels::React::Evaluator
- Inherits:
-
Object
- Object
- Interfacets::Client::Channels::React::Evaluator
- Defined in:
- lib/interfacets/client/channels/react/evaluator.rb
Instance Attribute Summary collapse
-
#facet ⇒ Object
readonly
This just isolates the evaluation so that we don't conflict with other methods.
Class Method Summary collapse
Instance Method Summary collapse
- #call(handler, event) ⇒ Object
- #channel(name) ⇒ Object
-
#initialize(facet) ⇒ Evaluator
constructor
A new instance of Evaluator.
Constructor Details
#initialize(facet) ⇒ Evaluator
Returns a new instance of Evaluator.
18 19 20 |
# File 'lib/interfacets/client/channels/react/evaluator.rb', line 18 def initialize(facet) @facet = facet end |
Instance Attribute Details
#facet ⇒ Object (readonly)
This just isolates the evaluation so that we don't conflict with other methods
for associations, this facet needs to be the relevant one...
16 17 18 |
# File 'lib/interfacets/client/channels/react/evaluator.rb', line 16 def facet @facet end |
Class Method Details
.call(facet, handler, event) ⇒ Object
8 9 10 |
# File 'lib/interfacets/client/channels/react/evaluator.rb', line 8 def self.call(facet, handler, event) new(facet).call(handler, event) end |
Instance Method Details
#call(handler, event) ⇒ Object
22 23 24 |
# File 'lib/interfacets/client/channels/react/evaluator.rb', line 22 def call(handler, event) Shared::Utils.permissive_exec(self, event, &handler) end |
#channel(name) ⇒ Object
26 27 28 |
# File 'lib/interfacets/client/channels/react/evaluator.rb', line 26 def channel(name) System.current_bus.channel(name).builder end |