Exception: EnvSpec::ValidationError
- Defined in:
- lib/envspec/errors.rb
Instance Attribute Summary collapse
-
#problems ⇒ Object
readonly
Returns the value of attribute problems.
Instance Method Summary collapse
-
#initialize(problems) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(problems) ⇒ ValidationError
Returns a new instance of ValidationError.
14 15 16 17 18 |
# File 'lib/envspec/errors.rb', line 14 def initialize(problems) @problems = Array(problems) lines = ["env validation failed:"] + @problems.map { |p| " - #{p}" } super(lines.join("\n")) end |
Instance Attribute Details
#problems ⇒ Object (readonly)
Returns the value of attribute problems.
13 14 15 |
# File 'lib/envspec/errors.rb', line 13 def problems @problems end |