Class: Jsus::Util::PostProcessor::Semicolon
- Defined in:
- lib/jsus/util/post_processor/semicolon.rb
Instance Method Summary collapse
-
#process(options = {}) ⇒ Array
Adds a semicolon to the beginning of every file.
Methods inherited from Base
Methods included from Mixins::OperatesOnSources
Constructor Details
This class inherits a constructor from Jsus::Util::PostProcessor::Base
Instance Method Details
#process(options = {}) ⇒ Array
Adds a semicolon to the beginning of every file
8 9 10 11 12 13 14 |
# File 'lib/jsus/util/post_processor/semicolon.rb', line 8 def process( = {}) source_files.map do |file| file = file.dup file.source = file.source.gsub(/^([^;])/, ";\n") file end end |