Class: Slaver::ConfigHandler

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/slaver/config_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



5
6
7
# File 'lib/slaver/config_handler.rb', line 5

def block
  @block
end

#current_configObject (readonly)

Returns the value of attribute current_config.



5
6
7
# File 'lib/slaver/config_handler.rb', line 5

def current_config
  @current_config
end

#saved_blockObject (readonly)

Returns the value of attribute saved_block.



5
6
7
# File 'lib/slaver/config_handler.rb', line 5

def saved_block
  @saved_block
end

#saved_configObject (readonly)

Returns the value of attribute saved_config.



5
6
7
# File 'lib/slaver/config_handler.rb', line 5

def saved_config
  @saved_config
end

Instance Method Details

#run_with(klass, config_name, pools_handler) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/slaver/config_handler.rb', line 7

def run_with(klass, config_name, pools_handler)
  config_name = prepare(config_name)

  pools_handler.for_config(klass, config_name)

  with_config(config_name) { yield }
end