Class: Calligraphy::XML::Builder

Inherits:
Object
  • Object
show all
Includes:
WebDavElements
Defined in:
lib/calligraphy/xml/builder.rb

Overview

Responsible for building XML responses for WebDAV requests.

Constant Summary

Constants included from WebDavElements

WebDavElements::DAV_NS_METHODS, WebDavElements::DAV_NS_TAGS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from WebDavElements

#lock_response, #propfind_response, #proppatch_response

Constructor Details

#initialize(dav_ns: 'D', server_protocol: 'HTTP/1.1') ⇒ Builder

:nodoc:



12
13
14
15
16
# File 'lib/calligraphy/xml/builder.rb', line 12

def initialize(dav_ns: 'D', server_protocol: 'HTTP/1.1')
  @dav_ns = dav_ns
  @default_ns = { "xmlns:#{@dav_ns}" => 'DAV:' }
  @server_protocol = server_protocol
end

Instance Attribute Details

#dav_nsObject (readonly)

Returns the value of attribute dav_ns.



9
10
11
# File 'lib/calligraphy/xml/builder.rb', line 9

def dav_ns
  @dav_ns
end

#default_nsObject (readonly)

Returns the value of attribute default_ns.



9
10
11
# File 'lib/calligraphy/xml/builder.rb', line 9

def default_ns
  @default_ns
end

#server_protocolObject (readonly)

Returns the value of attribute server_protocol.



9
10
11
# File 'lib/calligraphy/xml/builder.rb', line 9

def server_protocol
  @server_protocol
end