diff --git a/lib/rom/csv/commands/create.rb b/lib/rom/csv/commands/create.rb index e92030a..62a1406 100644 --- a/lib/rom/csv/commands/create.rb +++ b/lib/rom/csv/commands/create.rb @@ -17,6 +17,8 @@ def execute(tuples) insert_tuples end + private + def insert(tuples) tuples.each { |tuple| dataset << new_row(tuple) } dataset.sync! diff --git a/lib/rom/csv/commands/delete.rb b/lib/rom/csv/commands/delete.rb index 8afed3b..944f751 100644 --- a/lib/rom/csv/commands/delete.rb +++ b/lib/rom/csv/commands/delete.rb @@ -19,6 +19,8 @@ def execute dataset.data end + private + def dataset relation.dataset end diff --git a/lib/rom/csv/commands/update.rb b/lib/rom/csv/commands/update.rb index e1144c0..8979ec5 100644 --- a/lib/rom/csv/commands/update.rb +++ b/lib/rom/csv/commands/update.rb @@ -14,6 +14,8 @@ def execute(tuple) update(tuple) end + private + def update(tuple) original_data = original_dataset.to_a output = []