Skip to content

Instantly share code, notes, and snippets.

@jeffkreeftmeijer
Created March 11, 2010 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffkreeftmeijer/329318 to your computer and use it in GitHub Desktop.
Save jeffkreeftmeijer/329318 to your computer and use it in GitHub Desktop.
module MyApi
include Nori
class << self
attr_accessor :username
end
class User < Resource
action :index, :url => 'http://myapi.com/users.xml'
end
class Friend < Resource
action :index, :url => "http://myapi.com/users/#{MyApi.username}/friends.xml"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment