Sha256: 0c0963a43c08b65422ce4633b7c9cc85464a2d40088b3bc7df174368ce8dd64d

Contents?: true

Size: 301 Bytes

Versions: 2

Compression:

Stored size: 301 Bytes

Contents

class StimulusReflex::Controller
  attr_reader :channel, :url

  delegate :connection, to: :channel
  delegate :session, to: :request

  def initialize(channel, url: nil)
    @channel = channel
    @url = url
  end

  def request
    @request ||= ActionDispatch::Request.new(connection.env)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stimulus_reflex-0.2.0 lib/stimulus_reflex/controller.rb
stimulus_reflex-0.1.12 lib/stimulus_reflex/controller.rb