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.



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