Class: Kettle::Jem::PluginHelpers
- Inherits:
-
Object
- Object
- Kettle::Jem::PluginHelpers
- Defined in:
- lib/kettle/jem.rb
Instance Method Summary collapse
-
#initialize(project_root:, changed_files:, diagnostics:) ⇒ PluginHelpers
constructor
A new instance of PluginHelpers.
- #record_template_result(path, action) ⇒ Object
Constructor Details
#initialize(project_root:, changed_files:, diagnostics:) ⇒ PluginHelpers
Returns a new instance of PluginHelpers.
1673 1674 1675 1676 1677 |
# File 'lib/kettle/jem.rb', line 1673 def initialize(project_root:, changed_files:, diagnostics:) @project_root = project_root @changed_files = changed_files @diagnostics = diagnostics end |
Instance Method Details
#record_template_result(path, action) ⇒ Object
1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 |
# File 'lib/kettle/jem.rb', line 1679 def record_template_result(path, action) relative_path = relative_project_path(path) normalize_recorded_template_file(path, relative_path) @changed_files << relative_path unless @changed_files.include?(relative_path) @diagnostics << { kind: "plugin_file_change", path: relative_path, action: action.to_s } end |