Created
October 7, 2013 21:43
-
-
Save jseakle/6875446 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find(id) | |
@source.find(id) | |
end | |
def find_all(ids) | |
@source.find_all(ids) | |
end | |
------------------ | |
def find(id) | |
if(id.is_a? Array) | |
find_all(ids) | |
end | |
@source.find(id) | |
end | |
private | |
find_all(ids) | |
@source.find_all(ids) | |
end | |
------------------- | |
def find(id_or_id_array) | |
return find_all(id_or_id_array) if id_or_id_array.is_a? Array | |
@source.find(id_or_id_array) | |
end | |
private | |
find_all(ids) | |
@source.find_all(ids) | |
end | |
------------------- | |
def find(id_or_id_array) | |
if id_or_id_array.is_a? Array | |
id_array = id_or_id_array | |
return find_all(id_array) | |
end | |
id = id_or_id_array | |
@source.find(id) | |
end | |
private | |
find_all(ids) | |
@source.find_all(ids) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment