Class: Upkeep::HerbSupport::SourceInstrumenter
- Inherits:
-
Object
- Object
- Upkeep::HerbSupport::SourceInstrumenter
- Defined in:
- lib/upkeep/herb/source_instrumenter.rb
Instance Method Summary collapse
-
#initialize(manifest:) ⇒ SourceInstrumenter
constructor
A new instance of SourceInstrumenter.
- #instrument(source) ⇒ Object
Constructor Details
#initialize(manifest:) ⇒ SourceInstrumenter
Returns a new instance of SourceInstrumenter.
8 9 10 |
# File 'lib/upkeep/herb/source_instrumenter.rb', line 8 def initialize(manifest:) @manifest = manifest end |
Instance Method Details
#instrument(source) ⇒ Object
12 13 14 15 16 |
# File 'lib/upkeep/herb/source_instrumenter.rb', line 12 def instrument(source) return source unless manifest.parse.fetch(:ok) apply_replacements(source, replacements_for(source)) end |