Class: Zaikio::Hub::Connection

Inherits:
Base
  • Object
show all
Defined in:
lib/zaikio/hub/connection.rb

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Connection

Returns a new instance of Connection.



13
14
15
16
17
18
19
20
21
# File 'lib/zaikio/hub/connection.rb', line 13

def initialize(attributes = {})
  if attributes["connectable_id"]
    super(attributes.merge(
      "id" => "#{attributes['connectable_type']}-#{attributes['connectable_id']}"
    ))
  else
    super
  end
end