class Pragmater::Processors::Remover
Removes existing pragma comments.
Attributes
body[R]
comments[R]
Public Class Methods
new(comments, body)
click to toggle source
# File lib/pragmater/processors/remover.rb, line 7 def initialize comments, body @comments = comments @body = body end
Public Instance Methods
call()
click to toggle source
# File lib/pragmater/processors/remover.rb, line 12 def call body.first.then do |first_line| body.delete_at 0 if first_line == "\n" && comments.empty? comments + body end end