Method: Pantry::Client#initialize
- Defined in:
- lib/pantry/client.rb
#initialize(application: nil, environment: nil, roles: [], identity: nil, network_stack_class: Communication::Client) ⇒ Client
Returns a new instance of Client.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/pantry/client.rb', line 19 def initialize(application: nil, environment: nil, roles: [], identity: nil, network_stack_class: Communication::Client) @info = Pantry::ClientInfo.new( application: application, environment: environment, roles: roles || [], identity: identity || current_hostname ) @commands = CommandHandler.new(self, Pantry.client_commands) @networking = network_stack_class.new_link(self) end |