Files

ActiveResource::CustomMethods::InstanceMethods

Public Instance Methods

delete(method_name, options = {}) click to toggle source
     # File lib/active_resource/custom_methods.rb, line 104
104:       def delete(method_name, options = {})
105:         connection.delete(custom_method_element_url(method_name, options), self.class.headers)
106:       end
get(method_name, options = {}) click to toggle source
    # File lib/active_resource/custom_methods.rb, line 87
87:       def get(method_name, options = {})
88:         connection.get(custom_method_element_url(method_name, options), self.class.headers)
89:       end
post(method_name, options = {}, body = nil) click to toggle source
    # File lib/active_resource/custom_methods.rb, line 91
91:       def post(method_name, options = {}, body = nil)
92:         request_body = body.blank? ? encode : body
93:         if new?
94:           connection.post(custom_method_new_element_url(method_name, options), request_body, self.class.headers)
95:         else
96:           connection.post(custom_method_element_url(method_name, options), request_body, self.class.headers)
97:         end
98:       end
put(method_name, options = {}, body = '') click to toggle source
     # File lib/active_resource/custom_methods.rb, line 100
100:       def put(method_name, options = {}, body = '')
101:         connection.put(custom_method_element_url(method_name, options), body, self.class.headers)
102:       end

Private Instance Methods

custom_method_element_url(method_name, options = {}) click to toggle source
     # File lib/active_resource/custom_methods.rb, line 110
110:         def custom_method_element_url(method_name, options = {})
111:           "#{self.class.prefix(prefix_options)}#{self.class.collection_name}/#{id}/#{method_name}.#{self.class.format.extension}#{self.class.__send__(:query_string, options)}"
112:         end
custom_method_new_element_url(method_name, options = {}) click to toggle source
     # File lib/active_resource/custom_methods.rb, line 114
114:         def custom_method_new_element_url(method_name, options = {})
115:           "#{self.class.prefix(prefix_options)}#{self.class.collection_name}/new/#{method_name}.#{self.class.format.extension}#{self.class.__send__(:query_string, options)}"
116:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.