Method: Sfn::CommandModule::Base::InstanceMethods#config

Defined in:
lib/sfn/command_module/base.rb

#configSmash

Note:

callback requires are also loaded here

Override config method to memoize the result allowing for modifications to the configuration during runtime

Returns:

  • (Smash)


143
144
145
146
147
148
149
150
151
# File 'lib/sfn/command_module/base.rb', line 143

def config
  memoize(:config) do
    result = super
    result.fetch(:callbacks, :require, []).each do |c_loader|
      require c_loader
    end
    result
  end
end