Module: RuboCop::Cop::I18n::GetText
- Defined in:
- lib/rubocop/cop/i18n/gettext.rb,
lib/rubocop/cop/i18n/gettext/decorate_string.rb,
lib/rubocop/cop/i18n/gettext/decorate_function_message.rb,
lib/rubocop/cop/i18n/gettext/decorate_string_formatting_using_percent.rb,
lib/rubocop/cop/i18n/gettext/decorate_string_formatting_using_interpolation.rb
Defined Under Namespace
Classes: DecorateFunctionMessage, DecorateString, DecorateStringFormattingUsingInterpolation, DecorateStringFormattingUsingPercent
Class Method Summary
collapse
Class Method Details
.supported_decorator?(decorator_name) ⇒ Boolean
39
40
41
|
# File 'lib/rubocop/cop/i18n/gettext.rb', line 39
def self.supported_decorator?(decorator_name)
supported_decorators.include?(decorator_name)
end
|
.supported_decorators ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/rubocop/cop/i18n/gettext.rb', line 14
def self.supported_decorators
%w[
_
n_
np_
ns_
N_
Nn_
D_
Dn_
Ds_
Dns_
d_
dn_
ds_
dns_
p_
s_
]
end
|
.supported_method?(method_name) ⇒ Boolean
35
36
37
|
# File 'lib/rubocop/cop/i18n/gettext.rb', line 35
def self.supported_method?(method_name)
supported_methods.include?(method_name)
end
|
.supported_methods ⇒ Object
7
8
9
|
# File 'lib/rubocop/cop/i18n/gettext.rb', line 7
def self.supported_methods
%w[raise fail]
end
|