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.



378
379
380
381
382
383
384
385
386
# File 'lib/svelte_on_rails/ssr_server.rb', line 378

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



375
376
377
# File 'lib/svelte_on_rails/ssr_server.rb', line 375

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



375
376
377
# File 'lib/svelte_on_rails/ssr_server.rb', line 375

def socket_path
  @socket_path
end

Instance Method Details

#ssr_server_ppid_fileObject



388
389
390
# File 'lib/svelte_on_rails/ssr_server.rb', line 388

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