Class: ActionCable::SubscriptionAdapter::Litecable

Inherits:
Litecable
  • Object
show all
Includes:
ChannelPrefix
Defined in:
lib/action_cable/subscription_adapter/litecable.rb

Overview

:nodoc:

Constant Summary

Constants inherited from Litecable

Litecable::DEFAULT_OPTIONS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Litecable

#broadcast, #subscribe, #unsubscribe

Methods included from Litemetric::Measurable

#capture, #capture_snapshot, #collect_metrics, #create_snapshotter, #measure, #metrics_identifier

Methods included from Litesupport::Liteconnection

#close, #journal_mode, #options, #path, #size, #synchronous

Methods included from Litesupport::Forkable

#_fork

Constructor Details

#initialize(server, logger = nil) ⇒ Litecable

Returns a new instance of Litecable.



12
13
14
15
16
# File 'lib/action_cable/subscription_adapter/litecable.rb', line 12

def initialize(server, logger = nil)
  @server = server
  @logger = server.logger
  super({config_path: "./config/litecable.yml"})
end

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger.



8
9
10
# File 'lib/action_cable/subscription_adapter/litecable.rb', line 8

def logger
  @logger
end

#serverObject (readonly)

Returns the value of attribute server.



8
9
10
# File 'lib/action_cable/subscription_adapter/litecable.rb', line 8

def server
  @server
end

Instance Method Details

#shutdownObject



18
19
20
# File 'lib/action_cable/subscription_adapter/litecable.rb', line 18

def shutdown
  close
end