Class: Calligraphy::Get

Inherits:
WebDavRequest show all
Defined in:
lib/calligraphy/get.rb

Instance Attribute Summary

Attributes inherited from WebDavRequest

#headers, #resource, #response

Instance Method Summary collapse

Methods inherited from WebDavRequest

#initialize

Constructor Details

This class inherits a constructor from Calligraphy::WebDavRequest

Instance Method Details

#request(head: false) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/calligraphy/get.rb', line 3

def request(head: false)
  if @resource.readable?
    return :ok if head
    return :ok, @resource.read
  else
    return :not_found
  end
end