Class: RuboCop::Haml::RubyClipper::TrailingDoRemover
- Inherits:
-
Object
- Object
- RuboCop::Haml::RubyClipper::TrailingDoRemover
- Defined in:
- lib/rubocop/haml/ruby_clipper.rb
Overview
Remove trailing ‘do`.
Constant Summary collapse
- REGEXP =
/ (?:\b[ \t]*|[ \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.
112 113 114 |
# File 'lib/rubocop/haml/ruby_clipper.rb', line 112 def initialize(code) @code = code end |
Class Method Details
.call(code) ⇒ RubyClip
106 107 108 |
# File 'lib/rubocop/haml/ruby_clipper.rb', line 106 def call(code) new(code).call end |