Skip to content

Instantly share code, notes, and snippets.

@bradediger
Created March 26, 2009 17:38
Show Gist options
  • Save bradediger/86215 to your computer and use it in GitHub Desktop.
Save bradediger/86215 to your computer and use it in GitHub Desktop.
Please don't do this.
def Service(name)
Class.new(ActiveResource::Base) do
self.site = ServiceLocator[name]
self.user = 'api'
self.password = 'ooga-booga'
def self.-@
self
end
end
end
# class User <- Service(:login)
# end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment