Last active
August 29, 2015 14:12
-
-
Save inf0rmer/c3034198f813d92492f9 to your computer and use it in GitHub Desktop.
Blanket::Wrapper's macro-like interface for defining REST actions
This file contains hidden or 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 add_action(action) | |
define_method(action) do |id=nil, options={}| | |
request(action, id, options) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment