Sha256: 3a1bc02952e1f03e4eeb0b2619a68dcb1ad511937d3cf192fef02a49bd2ee3fe

Contents?: true

Size: 479 Bytes

Versions: 4

Compression:

Stored size: 479 Bytes

Contents

# frozen_string_literal: true

module StimulusReflex
  class NothingBroadcaster < Broadcaster
    def broadcast(_, data)
      operations << ["document", :dispatch_event]
      cable_ready.dispatch_event(
        name: "stimulus-reflex:morph-nothing",
        payload: payload,
        stimulus_reflex: data.merge(morph: to_sym)
      ).broadcast
    end

    def nothing?
      true
    end

    def to_sym
      :nothing
    end

    def to_s
      "Nothing"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
stimulus_reflex-3.5.0.pre6 lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb
stimulus_reflex-3.5.0.pre5 lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb
stimulus_reflex-3.5.0.pre4 lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb
stimulus_reflex-3.5.0.pre3 lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb