Class: RuboCop::Haml::RubyClipper::PrecedingKeywordRemover
- Inherits:
-
Object
- Object
- RuboCop::Haml::RubyClipper::PrecedingKeywordRemover
- Defined in:
- lib/rubocop/haml/ruby_clipper.rb
Overview
Remove preceding keyword.
Constant Summary collapse
- REGEXP =
/ \A (?: begin | case | else | elsif | ensure | if | rescue | unless | until | when | while | for[ \t]+\w+[ \t]+in ) \b[ \t]* /x.freeze
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Hash
-
#initialize(code) ⇒ PrecedingKeywordRemover
constructor
A new instance of PrecedingKeywordRemover.
Constructor Details
#initialize(code) ⇒ PrecedingKeywordRemover
Returns a new instance of PrecedingKeywordRemover.
69 70 71 |
# File 'lib/rubocop/haml/ruby_clipper.rb', line 69 def initialize(code) @code = code end |
Class Method Details
.call(code) ⇒ RubyClip
63 64 65 |
# File 'lib/rubocop/haml/ruby_clipper.rb', line 63 def call(code) new(code).call end |