Class: Refinement::UsedPath::YAML
- Inherits:
-
Refinement::UsedPath
- Object
- Refinement::UsedPath
- Refinement::UsedPath::YAML
- Defined in:
- lib/refinement/used_path.rb
Overview
Represents a path to a YAML file that some target depends upon, but where only a subset of the YAML is needed to determine a change.
Instance Method Summary collapse
-
#find_in_changeset(changeset) ⇒ Nil, String
If the path has been modified, a string explaining the modification.
-
#initialize(yaml_keypath:, **kwargs) ⇒ YAML
constructor
A new instance of YAML.
Methods inherited from Refinement::UsedPath
Constructor Details
#initialize(yaml_keypath:, **kwargs) ⇒ YAML
Returns a new instance of YAML.
71 72 73 74 |
# File 'lib/refinement/used_path.rb', line 71 def initialize(yaml_keypath:, **kwargs) super(**kwargs) @yaml_keypath = yaml_keypath end |
Instance Method Details
#find_in_changeset(changeset) ⇒ Nil, String
Returns If the path has been modified, a string explaining the modification.
77 78 79 80 |
# File 'lib/refinement/used_path.rb', line 77 def find_in_changeset(changeset) modification, _yaml_diff = changeset.find_modification_for_yaml_keypath(absolute_path: path, keypath: yaml_keypath) add_reason modification, changeset: changeset end |