Method: Blur.connect

Defined in:
library/blur.rb

.connect(options = {}, &block) ⇒ Object

Note:

The idea is that this should never stop or return anything.

Instantiates a client with given options and then makes the client instance evaluate the given block to form a DSL.

Parameters:

  • options (Hash) (defaults to: {})

    the options for the client.

Options Hash (options):

  • networks (Array)

    list of hashes that contain network options.



66
67
68
69
70
# File 'library/blur.rb', line 66

def self.connect options = {}, &block
  Client.new(options).tap do |client|
    client.instance_eval &block
  end.connect
end