Class: RubomaticHtml::Cop::Style::NoFormFor
- Inherits:
-
Base
- Object
- Base
- Base
- RubomaticHtml::Cop::Style::NoFormFor
show all
- Defined in:
- lib/rubomatic-html/cop/style/no_form_for.rb
Instance Attribute Summary
Attributes inherited from Base
#config, #file
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
department
Methods inherited from Base
allowed_config_transform, #initialize
Class Method Details
.abstract_cop? ⇒ Boolean
9
10
11
|
# File 'lib/rubomatic-html/cop/style/no_form_for.rb', line 9
def abstract_cop?
false
end
|
.name ⇒ Object
14
15
16
|
# File 'lib/rubomatic-html/cop/style/no_form_for.rb', line 14
def name
[department, 'NoFormFor'].join('/')
end
|
Instance Method Details
#run_for_line(line, index) ⇒ Object
20
21
22
23
24
|
# File 'lib/rubomatic-html/cop/style/no_form_for.rb', line 20
def run_for_line(line, index)
return unless line.match?(/form_for/i)
puts("#{file}:#{index}: calls `form_for`. Use `form_with` instead")
end
|