Method: Codebot::NetworkManager#create

Defined in:
lib/codebot/network_manager.rb

#create(params) ⇒ Object

Creates a new network from the given parameters.

Parameters:

  • params (Hash)

    the parameters to initialize the network with



21
22
23
24
25
26
27
28
# File 'lib/codebot/network_manager.rb', line 21

def create(params)
  network = Network.new(params.merge(config: {}))
  @config.transaction do
    check_name_available!(network.name)
    @config.networks << network
    network_feedback(network, :created) unless params[:quiet]
  end
end