Sha256: 6545010109c448aadd90e71ac170a2563e85860249282272169641eb52aab9f4

Contents?: true

Size: 502 Bytes

Versions: 8

Compression:

Stored size: 502 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",
        selector: nil,
        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

8 entries across 8 versions & 1 rubygems

Version Path
stimulus_reflex-3.5.0.rc4 lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb
stimulus_reflex-3.5.0.rc3 lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb
stimulus_reflex-3.5.0.rc2 lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb
stimulus_reflex-3.5.0.rc1 lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb
stimulus_reflex-3.5.0.pre10 lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb
stimulus_reflex-3.5.0.pre9 lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb
stimulus_reflex-3.5.0.pre8 lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb
stimulus_reflex-3.5.0.pre7 lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb