Git Product home page Git Product logo

Comments (3)

JustinAiken avatar JustinAiken commented on August 15, 2024

I've found two ways to make this work:

  • In the Blather CoreExt, change it to check for Punchblock::Events or Event::Complete::Reasons:
def rayo_event?
  event.is_a?(Punchblock::Event) || event.is_a?(Punchblock::Event::Complete::Reason)
end
  • In the actual Signal, override #is_a?:
class Signal < Event::Complete::Reason

  def is_a?(something)
    something == Punchblock::Event ? true : super(something)
  end
...

If I do either one of those, then I can async watch for CPA events.

component.register_handler :event, Punchblock::Component::Input::Signal do |event|
  yield event if block_given?
end if async?

Thoughts @benlangfeld, on either of those two approaches, or a better approach I've missed? Would you rather have this in Punchblock core, or a monkeypatch in adhearsion-cpa?

from punchblock.

benlangfeld avatar benlangfeld commented on August 15, 2024

I'd rather have the reason be a Punchblock::Event.

from punchblock.

benlangfeld avatar benlangfeld commented on August 15, 2024

Fixed by #208.

from punchblock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.