Exception: GetText::Tools::Task::ValidationError
- Defined in:
- lib/gettext/tools/task.rb
Instance Attribute Summary collapse
-
#reasons ⇒ Object
readonly
Returns the value of attribute reasons.
Instance Method Summary collapse
-
#initialize(reasons) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(reasons) ⇒ ValidationError
Returns a new instance of ValidationError.
32 33 34 35 36 37 38 39 40 |
# File 'lib/gettext/tools/task.rb', line 32 def initialize(reasons) @reasons = reasons lines = [] lines << "invalid configurations:" @reasons.each do |variable, reason| lines << "#{variable}: #{reason}" end super(lines.join("\n")) end |
Instance Attribute Details
#reasons ⇒ Object (readonly)
Returns the value of attribute reasons.
31 32 33 |
# File 'lib/gettext/tools/task.rb', line 31 def reasons @reasons end |