Exception: ConfigModule::ConfigFileNotSpecified

Inherits:
TypeError
  • Object
show all
Defined in:
lib/config_module/exceptions.rb

Overview

for when config_file was not set

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config_file) ⇒ ConfigFileNotSpecified

Returns a new instance of ConfigFileNotSpecified.


43
44
45
# File 'lib/config_module/exceptions.rb', line 43

def initialize config_file
  @config_file = config_file
end

Instance Attribute Details

#config_fileObject (readonly)

Returns the value of attribute config_file.


46
47
48
# File 'lib/config_module/exceptions.rb', line 46

def config_file
  @config_file
end

Instance Method Details

#messageObject


48
49
50
51
# File 'lib/config_module/exceptions.rb', line 48

def message
  "config_file location is #{config_file.inspect}."\
  "Set your config's location with the `config_file` method."
end