aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/struct.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/lib/active_resource/struct.rb')
-rw-r--r--activeresource/lib/active_resource/struct.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activeresource/lib/active_resource/struct.rb b/activeresource/lib/active_resource/struct.rb
index 6f4ffecc20..ee1f15d781 100644
--- a/activeresource/lib/active_resource/struct.rb
+++ b/activeresource/lib/active_resource/struct.rb
@@ -1,4 +1,13 @@
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)