Skip to content

Commit

Permalink
Introduce add_array and add_hsh as alias #374
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Oct 29, 2024
1 parent 9b4a6c1 commit 8ef6d65
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions metafix/src/main/java/org/metafacture/metafix/FixMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,24 @@ public void apply(final Metafix metafix, final Record record, final List<String>

// RECORD-LEVEL METHODS:

add_array {
@Override
public void apply(final Metafix metafix, final Record record, final List<String> params, final Map<String, String> options) {
set_array.apply(metafix, record, params, options);
}
},
add_field {
@Override
public void apply(final Metafix metafix, final Record record, final List<String> params, final Map<String, String> options) {
record.set(params.get(0), new Value(params.get(1)));
}
},
add_hash {
@Override
public void apply(final Metafix metafix, final Record record, final List<String> params, final Map<String, String> options) {
set_hash.apply(metafix, record, params, options);
}
},
array { // array-from-hash
@Override
public void apply(final Metafix metafix, final Record record, final List<String> params, final Map<String, String> options) {
Expand Down

0 comments on commit 8ef6d65

Please sign in to comment.