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.



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

#reasonsObject (readonly)

Returns the value of attribute reasons.



31
32
33
# File 'lib/gettext/tools/task.rb', line 31

def reasons
  @reasons
end