Method: TCFG::Helper#tcfg

Defined in:
lib/tcfg/tcfg_helper.rb

#tcfgActiveSupport::HashWithIndifferentAccess

return a copy of the resolved configuration

This is the preferred way to access a complete copy of the fully resolved configuration.

Returns:

  • (ActiveSupport::HashWithIndifferentAccess)

    a copy of the resolved configuration



62
63
64
65
66
# File 'lib/tcfg/tcfg_helper.rb', line 62

def tcfg
  @tcfg_resolved_config ||= resolve_config
  # return a frozen deep copy of the configuration object to prevent mutations
  @tcfg_resolved_config.deep_dup.freeze
end