Module: Loco::WsConnectionIdentifier

Defined in:
lib/loco/ws_connection_identifier.rb

Class Method Summary collapse

Class Method Details

.call(resource) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/loco/ws_connection_identifier.rb', line 7

def call(resource)
  case resource
  when String then resource
  when Class then resource.name.downcase
  else "#{resource.class.name.downcase}:#{resource.id}"
  end
end