Class: Kettle::Jem::PluginHelpers

Inherits:
Object
  • Object
show all
Defined in:
lib/kettle/jem.rb

Instance Method Summary collapse

Constructor Details

#initialize(project_root:, changed_files:, diagnostics:) ⇒ PluginHelpers

Returns a new instance of PluginHelpers.



1730
1731
1732
1733
1734
# File 'lib/kettle/jem.rb', line 1730

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



1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
# File 'lib/kettle/jem.rb', line 1736

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