mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
932e7b003c
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5962 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
16 lines
No EOL
408 B
Ruby
16 lines
No EOL
408 B
Ruby
module ActiveResource
|
|
# Class that allows a connection to a remote resource.
|
|
# Person = ActiveResource::Struct.new do |p|
|
|
# p.uri "http://www.mypeople.com/people"
|
|
# p.credentials :username => "mycreds", :password => "wordofpassage"
|
|
# end
|
|
#
|
|
# person = Person.find(1)
|
|
# person.name = "David"
|
|
# person.save!
|
|
class Struct
|
|
def self.create
|
|
Class.new(Base)
|
|
end
|
|
end
|
|
end |