1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activeresource/lib/active_resource/struct.rb
2007-01-16 06:34:10 +00:00

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