Exception: Nvar::EnvironmentVariableNotPresentError

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

Overview

Error that is raised when an environment variable is blank or unset when it is required

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*vars) ⇒ EnvironmentVariableNotPresentError

Returns a new instance of EnvironmentVariableNotPresentError.



30
31
32
33
# File 'lib/nvar.rb', line 30

def initialize(*vars)
  @vars = vars
  super()
end

Instance Attribute Details

#varsObject (readonly)

Returns the value of attribute vars.



28
29
30
# File 'lib/nvar.rb', line 28

def vars
  @vars
end

Instance Method Details

#messageObject



35
36
37
# File 'lib/nvar.rb', line 35

def message
  "The following variables are unset or blank: #{vars.map(&:name).join(', ')}"
end