Module: Pakyow::Support::Configurable::CommonMethods

Extended by:
Forwardable
Defined in:
lib/pakyow/support/configurable.rb

Instance Method Summary collapse

Instance Method Details

#configObject



90
91
92
# File 'lib/pakyow/support/configurable.rb', line 90

def config
  @__config
end

#configure!(configured_environment = nil) ⇒ Object

Configures the object for an environment.



96
97
98
99
100
101
102
103
104
# File 'lib/pakyow/support/configurable.rb', line 96

def configure!(configured_environment = nil)
  @__config.configure_defaults!(configured_environment)

  [:__global, configured_environment].compact.map(&:to_sym).select { |environment|
    __config_environments.key?(environment)
  }.each do |environment|
    instance_eval(&__config_environments[environment])
  end
end