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.



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

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

Instance Attribute Details

#varsObject (readonly)

Returns the value of attribute vars.



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

def vars
  @vars
end

Instance Method Details

#messageObject



38
39
40
# File 'lib/nvar.rb', line 38

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