Skip to content

Commit

Permalink
Explicitly mark command methods private
Browse files Browse the repository at this point in the history
The `execute` method is the only public method exposed by commands at
this time.
  • Loading branch information
elskwid committed Feb 27, 2017
1 parent d12024a commit ebc0474
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rom/csv/commands/create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def execute(tuples)
insert_tuples
end

private

def insert(tuples)
tuples.each { |tuple| dataset << new_row(tuple) }
dataset.sync!
Expand Down
2 changes: 2 additions & 0 deletions lib/rom/csv/commands/delete.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def execute
dataset.data
end

private

def dataset
relation.dataset
end
Expand Down
2 changes: 2 additions & 0 deletions lib/rom/csv/commands/update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ def execute(tuple)
update(tuple)
end

private

def update(tuple)
original_data = original_dataset.to_a
output = []
Expand Down

0 comments on commit ebc0474

Please sign in to comment.