Exception: GetText::Tools::Task::ValidationError

Inherits:
Error
  • Object
show all
Defined in:
lib/gettext/tools/task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reasons) ⇒ ValidationError

Returns a new instance of ValidationError.


34
35
36
37
38
39
40
41
42
# File 'lib/gettext/tools/task.rb', line 34

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

#reasonsObject (readonly)

Returns the value of attribute reasons


33
34
35
# File 'lib/gettext/tools/task.rb', line 33

def reasons
  @reasons
end