Class: SvelteOnRails::SsrServerHelpers

Inherits:
Object
  • Object
show all
Defined in:
lib/svelte_on_rails/ssr_server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSsrServerHelpers

Returns a new instance of SsrServerHelpers.



373
374
375
376
377
378
379
380
381
# File 'lib/svelte_on_rails/ssr_server.rb', line 373

def initialize

  @socket_namespace = [
    "svelte-ssr",
    Rails.application.class.module_parent_name[0..30],
    Rails.env,
  ].join("-")

end

Instance Attribute Details

#socket_namespaceObject (readonly)

theese helpers are used from the :check rake task For that reason they are within a separate class



370
371
372
# File 'lib/svelte_on_rails/ssr_server.rb', line 370

def socket_namespace
  @socket_namespace
end

#socket_path(ppid: Process.ppid) ⇒ Object (readonly)

theese helpers are used from the :check rake task For that reason they are within a separate class



370
371
372
# File 'lib/svelte_on_rails/ssr_server.rb', line 370

def socket_path
  @socket_path
end

Instance Method Details

#ssr_server_ppid_fileObject



383
384
385
# File 'lib/svelte_on_rails/ssr_server.rb', line 383

def ssr_server_ppid_file
  Rails.root.join("tmp", "pids", 'svelte_on_rails.ppid')
end