Class: AutoNetwork::Action::LoadPool

Inherits:
Object
  • Object
show all
Defined in:
lib/auto_network/action/load_pool.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ LoadPool

Returns a new instance of LoadPool.



6
7
8
# File 'lib/auto_network/action/load_pool.rb', line 6

def initialize(app, env)
  @app, @env = app, env
end

Instance Method Details

#call(env) ⇒ void

This method returns an undefined value.

Handle the loading and unloading of the auto_network pool

Parameters:

  • env (Hash)

Options Hash (env):

  • auto_network_pool (AutoNetwork::Pool)

    The global auto network pool

  • env (Vagrant::Environment)

    The Vagrant environment containing the active machines that need to be filtered.



19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/auto_network/action/load_pool.rb', line 19

def call(env)
  @env = env

  if env_ready?
    setup_ivars
    deserialize!
    @app.call(@env)
    serialize!
  else
    @app.call(@env)
  end
end