class Railsdav::Renderer::ResponseCollector
Attributes
controller[W]
Public Class Methods
new(controller, request_format)
click to toggle source
# File lib/railsdav/renderer/response_collector.rb, line 13 def initialize(controller, request_format) @controller, @request_format = controller, request_format @selector = ResponseTypeSelector.new(controller, request_format) end
Public Instance Methods
method_missing(name, *args)
click to toggle source
responds to calls like html, xml, json by ignoring them
Calls superclass method
# File lib/railsdav/renderer/response_collector.rb, line 25 def method_missing(name, *args) super unless Mime::EXTENSION_LOOKUP[name.to_s] or name == :any end
resource()
click to toggle source
# File lib/railsdav/renderer/response_collector.rb, line 18 def resource request_path = URI(@controller.request.url).path @resource ||= Renderer::ResourceDescriptor.new(request_path, @selector.resource_options) end
webdav() { |selector| ... }
click to toggle source
# File lib/railsdav/renderer/response_collector.rb, line 29 def webdav if block_given? yield @selector end end