Results for: "module_function"

Sends a MOVE request to the path and gets a response, as an HTTPResponse object.

No documentation available

Returns the full entity body.

Calling this method a second or subsequent time will return the string already read.

http.request_get('/index.html') {|res|
  puts res.body
}

http.request_get('/index.html') {|res|
  p res.body.object_id   # 538149362
  p res.body.object_id   # 538149362
}

Because it may be necessary to modify the body, Eg, decompression this method facilitates that.

Sends a DELETE command to remove the mailbox.

A Net::IMAP::NoResponseError is raised if a mailbox with that name cannot be deleted, either because it does not exist or because the client does not have permission to delete it.

Sends a MOVE command to move the specified message(s) to the end of the specified destination mailbox. The set parameter is a number, an array of numbers, or a Range object. The number is a message sequence number. The IMAP MOVE extension is described in [RFC-6851].

Sends an IDLE command that waits for notifications of new or expunged messages. Yields responses from the server during the IDLE.

Use idle_done() to leave IDLE.

If timeout is given, this method returns after timeout seconds passed. timeout can be used for keep-alive. For example, the following code checks the connection for each 60 seconds.

loop do
  imap.idle(60) do |res|
    ...
  end
end

Marks a message for deletion on the server. Deletion does not actually occur until the end of the session; deletion may be cancelled for all marked messages by calling POP3#reset().

This method raises a POPError if an error occurs.

Example

POP3.start('pop.example.com', 110,
           'YourAccount, 'YourPassword') do |pop|
  n = 1
  pop.mails.each do |popmail|
    File.open("inbox/#{n}", 'w') do |f|
      f.write popmail.pop
    end
    popmail.delete         ####
    n += 1
  end
end

True if the mail has been deleted.

No documentation available

Args

v

String

Description

public setter for the typecode v. (with validation)

see also URI::FTP.check_typecode

Usage

require 'uri'

uri = URI.parse("ftp://john@ftp.example.com/my_file.img")
#=> #<URI::FTP:0x00000000923650 URL:ftp://john@ftp.example.com/my_file.img>
uri.typecode = "i"
# =>  "i"
uri
#=> #<URI::FTP:0x00000000923650 URL:ftp://john@ftp.example.com/my_file.img;type=i>

Searches list id for opt and the optional patterns for completion pat. If icase is true, the search is case insensitive. The result is returned or yielded if a block is given. If it isn’t found, nil is returned.

Appends sep to the text to be output. By default sep is ‘ ’

width argument is here for compatibility. It is a noop argument.

Sets the element of which this object is an attribute. Normally, this is not directly called.

Returns this attribute

Removes this Attribute from the tree, and returns true if successful

This method is usually not called directly.

Removes this child from the parent.

Returns

self

Deletes a child Element

element

Either an Element, which is removed directly; an xpath, where the first matching child is removed; or an Integer, where the n’th Element is removed.

Returns

the removed child

doc = Document.new '<a><b/><c/><c id="1"/></a>'
b = doc.root.elements[1]
doc.root.elements.delete b           #-> <a><c/><c id="1"/></a>
doc.elements.delete("a/c[@id='1']")  #-> <a><c/></a>
doc.root.elements.delete 1           #-> <a/>

Returns the number of attributes the owning Element contains.

doc = Document "<a x='1' y='2' foo:x='3'/>"
doc.root.attributes.length        #-> 3

Removes an attribute

attribute

either a String, which is the name of the attribute to remove – namespaces are significant here – or the attribute to remove.

Returns

the owning element

doc = Document.new "<a y:foo='0' x:foo='1' foo='3' z:foo='4'/>"
doc.root.attributes.delete 'foo'   #-> <a y:foo='0' x:foo='1' z:foo='4'/>"
doc.root.attributes.delete 'x:foo' #-> <a y:foo='0' z:foo='4'/>"
attr = doc.root.attributes.get_attribute('y:foo')
doc.root.attributes.delete attr    #-> <a z:foo='4'/>"
No documentation available
No documentation available

Returns the number of enumerated Enumerable objects, i.e. the size of each row.

Only use this if you do not want the XML declaration to be written; this object is ignored by the XML writer. Otherwise, instantiate your own XMLDecl and add it to the document.

Note that XML 1.1 documents must include an XML declaration

No documentation available

Removes tuple from the TupleBag.

Search took: 11ms  ·  Total Results: 3509