instance method post

Ruby on Rails edge

Since edge

Signature

post(&work)

Inline async calls

Parameters

work block
Source
# File actioncable/lib/action_cable/connection/test_case.rb, line 149
      def post(&work) = work.call

      def timer(every, &block)
        TestTimer.new(every, &block).tap { |t| @timers << t }
      end

      def advance_time(seconds)
        @timers.each { |timer| timer.advance(seconds) }
      end

      #== Pub/sub interface ==
      def subscribe(stream, callback, success_callback = nil)
        @streams[stream] << callback
        success_callback&.call
      end

      def unsubscribe(stream, callback)
        @streams[stream].delete(callback)
        @streams.delete(stream) if @streams[stream].empty?
      end
    end

Defined in actioncable/lib/action_cable/connection/test_case.rb line 149 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionCable::Connection::TestServer

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close