Class: CukeFig

Inherits:
OpenStruct show all
Defined in:
lib/cuke_fig.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(mid, *args) ⇒ Object



41
42
43
# File 'lib/cuke_fig.rb', line 41

def method_missing(mid, *args)
  @global_config.send(mid, *args)
end

Instance Method Details

#configObject



31
32
33
# File 'lib/cuke_fig.rb', line 31

def config
  self
end

#setup(common, environment: nil, env_configs: nil, override: nil) ⇒ Object



35
36
37
38
39
# File 'lib/cuke_fig.rb', line 35

def setup(common, environment: nil, env_configs: nil, override: nil)
  env_config = env_configs[environment] unless env_configs.nil? || environment.nil?
  config_files = expand_config_files common, env_config: env_config, override: override
  load(config_files)
end