--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Construct a subresource, preserving authentication.
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  site = RestClient::Resource.new('http://example.com', 'adam', 'mypasswd')\n  site['posts/1/comments'].post 'Good article.', :content_type =&gt; 'text/plain'\n"
- !ruby/struct:SM::Flow::P 
  body: "This is especially useful if you wish to define your site in one place and call it in multiple locations:"
- !ruby/struct:SM::Flow::VERB 
  body: "  def orders\n    RestClient::Resource.new('http://example.com/orders', 'admin', 'mypasswd')\n  end\n\n  orders.get                     # GET http://example.com/orders\n  orders['1'].get                # GET http://example.com/orders/1\n  orders['1/items'].delete       # DELETE http://example.com/orders/1/items\n"
- !ruby/struct:SM::Flow::P 
  body: "Nest resources as far as you want:"
- !ruby/struct:SM::Flow::VERB 
  body: "  site = RestClient::Resource.new('http://example.com')\n  posts = site['posts']\n  first_post = posts['1']\n  comments = first_post['comments']\n  comments.post 'Hello', :content_type =&gt; 'text/plain'\n"
full_name: RestClient::Resource#[]
is_singleton: false
name: "[]"
params: (suburl)
visibility: public
