Class: Pragmater::Remover
- Inherits:
-
Object
- Object
- Pragmater::Remover
- Defined in:
- lib/pragmater/remover.rb
Overview
Removes pragma comments.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(parser: Parsers::File.new) ⇒ Remover
constructor
A new instance of Remover.
Constructor Details
Instance Method Details
#call ⇒ Object
17 18 19 20 21 22 |
# File 'lib/pragmater/remover.rb', line 17 def call Pathname(settings.root_dir).files("{#{settings.patterns.join ","}}").map do |path| yield path if block_given? path.write parser.call(path, settings.comments, action: :remove).join end end |