def lock(nodes, depth = 'infinity')
      properties = {}

      nodes.each do |node|
        next unless node.is_a? Nokogiri::XML::Element

        properties[node.name.to_sym] = node
      end

      create_blank_file unless exists?

      create_lock properties, depth
      fetch_lock_info
    end
def lock(nodes, depth = 'infinity')
      properties = {}

      nodes.each do |node|
        next unless node.is_a? Nokogiri::XML::Element

        properties[node.name.to_sym] = node
      end

      create_blank_file unless exists?

      create_lock properties, depth
      fetch_lock_info
    end
Responsible for creating a lock on the resource (see section 9.10 of
 RFC4918).

 Used in LOCK requests.