Class: I18n::InflectionOptionNotFound

Inherits:
InvalidOptionForKind show all
Defined in:
lib/i18n-inflector/errors.rb

Overview

This is raised when there is no kind given in options. The kind is determined by looking at token placed in a pattern.

Instance Attribute Summary

Attributes inherited from InvalidOptionForKind

#option

Attributes inherited from InflectionPatternException

#pattern

Attributes inherited from InflectionException

#key, #kind, #token

Instance Method Summary collapse

Methods inherited from InvalidOptionForKind

#initialize

Methods inherited from InflectionPatternException

#initialize

Methods inherited from InflectionException

#initialize

Constructor Details

This class inherits a constructor from I18n::InvalidOptionForKind

Instance Method Details

#messageObject



75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/i18n-inflector/errors.rb', line 75

def message
  kind = @kind.to_s
  unless kind.empty?
    if kind[0..0] == I18n::Inflector::Config::Markers::STRICT_KIND
      kindmsg = ":#{kind} (or :#{kind[1..-1]})"
    else
      kindmsg = kind.to_sym.inspect
    end
  end
  "" << super <<
  "required option #{kindmsg} was not found"
end