Exception: YamlEnvTag::MissingEnvVariableError

Inherits:
Error
  • Object
show all
Defined in:
lib/yaml_env_tag/errors.rb

Overview

Exception raised when environment variable specified by the !ENV tag is not set.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(variable_name) ⇒ MissingEnvVariableError

Returns a new instance of MissingEnvVariableError.

Parameters:

  • variable_name (String)

    name of the environment variable.



18
19
20
21
# File 'lib/yaml_env_tag/errors.rb', line 18

def initialize(variable_name)
  @variable_name = variable_name
  super("Environment variable '#{variable_name}' is not set")
end

Instance Attribute Details

#variable_nameObject (readonly)

Returns the value of attribute variable_name.



15
16
17
# File 'lib/yaml_env_tag/errors.rb', line 15

def variable_name
  @variable_name
end