-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make REST delegation a bit cleaner, hopefully.
- Loading branch information
Showing
3 changed files
with
102 additions
and
74 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module Neography | ||
class Rest | ||
module Delegation | ||
|
||
def def_rest_delegations(options) | ||
options.each do |target_class, delegations| | ||
delegations.each do |from_method, to_method| | ||
def_delegator target_class, to_method, from_method | ||
end | ||
end | ||
end | ||
|
||
end | ||
end | ||
end |