Method: Raad::Configuration#load

Defined in:
lib/raad/configuration.rb

#load(file = nil) ⇒ Nil

Loads a configuration file and eval its content in the service object context

Parameters:

  • file (String) (defaults to: nil)

    The file to load, if not set will use ./config/servive_name

Returns:

  • (Nil)


17
18
19
20
# File 'lib/raad/configuration.rb', line 17

def load(file = nil)
  return unless File.exists?(file)
  self.instance_eval(IO.read(file))
end