Class: RuboCop::Cop::Kata::ProsePlacement
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Kata::ProsePlacement
- Defined in:
- lib/rubocop/cop/kata/prose_placement.rb
Constant Summary collapse
- MSG =
"Prose belongs to the presentation layer — pass data and phrase it there."- WORDS =
5
Instance Method Summary collapse
Instance Method Details
#on_dstr(node) ⇒ Object
12 13 14 |
# File 'lib/rubocop/cop/kata/prose_placement.rb', line 12 def on_dstr(node) add_offense(node) if prose?(node.each_child_node(:str).map(&:value).join(" ")) && !exempt?(node) end |
#on_str(node) ⇒ Object
8 9 10 |
# File 'lib/rubocop/cop/kata/prose_placement.rb', line 8 def on_str(node) add_offense(node) if prose?(node.value) && !exempt?(node) end |