Class: RuboCop::Erb::KeywordRemover::TrailingDoRemover
- Inherits:
-
Object
- Object
- RuboCop::Erb::KeywordRemover::TrailingDoRemover
- Defined in:
- lib/rubocop/erb/keyword_remover.rb
Overview
Remove trailing ‘do`.
Constant Summary collapse
- REGEXP =
/ [ \t] do [ \t]* (\|[^|]*\|)? [ \t]* \Z /x.freeze
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Hash
-
#initialize(code) ⇒ TrailingDoRemover
constructor
A new instance of TrailingDoRemover.
Constructor Details
#initialize(code) ⇒ TrailingDoRemover
Returns a new instance of TrailingDoRemover.
108 109 110 |
# File 'lib/rubocop/erb/keyword_remover.rb', line 108 def initialize(code) @code = code end |
Class Method Details
.call(code) ⇒ RubyClip
102 103 104 |
# File 'lib/rubocop/erb/keyword_remover.rb', line 102 def call(code) new(code).call end |